// from gir-files
// DO NOT EDIT
-use glib::object::ObjectType as ObjectType_;
-use glib::signal::connect_raw;
-use glib::signal::SignalHandlerId;
-use glib::translate::*;
-use std::boxed::Box as Box_;
-use std::fmt;
-use std::mem::transmute;
+use crate::{ffi};
+use glib::{object::ObjectType as _,prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
+use std::{boxed::Box as Box_};
glib::wrapper! {
#[doc(alias = "OstreeAsyncProgress")]
// unsafe { TODO: call ffi:ostree_async_progress_new_and_connect() }
//}
- #[cfg(any(feature = "v2019_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_6")))]
+ #[cfg(feature = "v2019_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_6")))]
#[doc(alias = "ostree_async_progress_copy_state")]
pub fn copy_state(&self, dest: &AsyncProgress) {
unsafe {
}
}
- //#[cfg(any(feature = "v2017_6", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ //#[cfg(feature = "v2017_6")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
//#[doc(alias = "ostree_async_progress_get")]
//pub fn get(&self, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
// unsafe { TODO: call ffi:ostree_async_progress_get() }
//}
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
#[doc(alias = "ostree_async_progress_get_status")]
#[doc(alias = "get_status")]
pub fn status(&self) -> Option<glib::GString> {
}
}
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
#[doc(alias = "ostree_async_progress_get_variant")]
#[doc(alias = "get_variant")]
pub fn variant(&self, key: &str) -> Option<glib::Variant> {
}
}
- //#[cfg(any(feature = "v2017_6", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ //#[cfg(feature = "v2017_6")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
//#[doc(alias = "ostree_async_progress_set")]
//pub fn set(&self, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
// unsafe { TODO: call ffi:ostree_async_progress_set() }
//}
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
#[doc(alias = "ostree_async_progress_set_status")]
pub fn set_status(&self, status: Option<&str>) {
unsafe {
}
}
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
#[doc(alias = "ostree_async_progress_set_variant")]
pub fn set_variant(&self, key: &str, value: &glib::Variant) {
unsafe {
}
unsafe {
let f: Box_<F> = Box_::new(f);
- connect_raw(self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _,
- Some(transmute::<_, unsafe extern "C" fn()>(changed_trampoline::<F> as *const ())), Box_::into_raw(f))
+ connect_raw(self.as_ptr() as *mut _, c"changed".as_ptr() as *const _,
+ Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(changed_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
}
Self::new()
}
}
-
-impl fmt::Display for AsyncProgress {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("AsyncProgress")
- }
-}
// from gir-files
// DO NOT EDIT
-use glib::object::IsA;
-use glib::translate::*;
-use std::fmt;
-use std::ptr;
+use crate::{ffi};
+use glib::{prelude::*,translate::*};
glib::wrapper! {
#[doc(alias = "OstreeBootconfigParser")]
}
}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_bootconfig_parser_get_overlay_initrds")]
#[doc(alias = "get_overlay_initrds")]
pub fn overlay_initrds(&self) -> Vec<glib::GString> {
#[doc(alias = "ostree_bootconfig_parser_parse")]
pub fn parse(&self, path: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_bootconfig_parser_parse(self.to_glib_none().0, path.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_bootconfig_parser_parse_at")]
pub fn parse_at(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_bootconfig_parser_parse_at(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
}
}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_bootconfig_parser_set_overlay_initrds")]
pub fn set_overlay_initrds(&self, initrds: &[&str]) {
unsafe {
#[doc(alias = "ostree_bootconfig_parser_write")]
pub fn write(&self, output: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_bootconfig_parser_write(self.to_glib_none().0, output.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_bootconfig_parser_write_at")]
pub fn write_at(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_bootconfig_parser_write_at(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
Self::new()
}
}
-
-impl fmt::Display for BootconfigParser {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("BootconfigParser")
- }
-}
// from gir-files
// DO NOT EDIT
-use glib::translate::*;
-use std::hash;
+use crate::{ffi};
+use glib::{translate::*};
glib::wrapper! {
#[derive(Debug, PartialOrd, Ord)]
impl Eq for CollectionRef {}
-impl hash::Hash for CollectionRef {
+impl std::hash::Hash for CollectionRef {
#[inline]
- fn hash<H>(&self, state: &mut H) where H: hash::Hasher {
- hash::Hash::hash(&self.hash(), state)
+ fn hash<H>(&self, state: &mut H) where H: std::hash::Hasher {
+ std::hash::Hash::hash(&self.hash(), state)
}
}
// from gir-files
// DO NOT EDIT
-use crate::ObjectType;
-use glib::translate::*;
+use crate::{ffi,ObjectType};
+use glib::{translate::*};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
// from gir-files
// DO NOT EDIT
-use std::ffi::CStr;
+use crate::{ffi};
+use glib::{GStr};
#[doc(alias = "OSTREE_COMMIT_GVARIANT_STRING")]
-pub static COMMIT_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_GVARIANT_STRING).to_str().unwrap()});
-#[cfg(any(feature = "v2020_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
+pub static COMMIT_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_GVARIANT_STRING)};
+#[cfg(feature = "v2020_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_ARCHITECTURE")]
-pub static COMMIT_META_KEY_ARCHITECTURE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_ARCHITECTURE).to_str().unwrap()});
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+pub static COMMIT_META_KEY_ARCHITECTURE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_ARCHITECTURE)};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_COLLECTION_BINDING")]
-pub static COMMIT_META_KEY_COLLECTION_BINDING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_COLLECTION_BINDING).to_str().unwrap()});
-#[cfg(any(feature = "v2017_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+pub static COMMIT_META_KEY_COLLECTION_BINDING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_COLLECTION_BINDING)};
+#[cfg(feature = "v2017_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_ENDOFLIFE")]
-pub static COMMIT_META_KEY_ENDOFLIFE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE).to_str().unwrap()});
-#[cfg(any(feature = "v2017_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+pub static COMMIT_META_KEY_ENDOFLIFE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE)};
+#[cfg(feature = "v2017_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE")]
-pub static COMMIT_META_KEY_ENDOFLIFE_REBASE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE).to_str().unwrap()});
-#[cfg(any(feature = "v2017_9", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_9")))]
+pub static COMMIT_META_KEY_ENDOFLIFE_REBASE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE)};
+#[cfg(feature = "v2017_9")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_9")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_REF_BINDING")]
-pub static COMMIT_META_KEY_REF_BINDING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_REF_BINDING).to_str().unwrap()});
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+pub static COMMIT_META_KEY_REF_BINDING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_REF_BINDING)};
+#[cfg(feature = "v2017_13")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_SOURCE_TITLE")]
-pub static COMMIT_META_KEY_SOURCE_TITLE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_SOURCE_TITLE).to_str().unwrap()});
-#[cfg(any(feature = "v2014_9", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2014_9")))]
+pub static COMMIT_META_KEY_SOURCE_TITLE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_SOURCE_TITLE)};
+#[cfg(feature = "v2014_9")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2014_9")))]
#[doc(alias = "OSTREE_COMMIT_META_KEY_VERSION")]
-pub static COMMIT_META_KEY_VERSION: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_VERSION).to_str().unwrap()});
+pub static COMMIT_META_KEY_VERSION: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_VERSION)};
#[doc(alias = "OSTREE_DIRMETA_GVARIANT_STRING")]
-pub static DIRMETA_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_DIRMETA_GVARIANT_STRING).to_str().unwrap()});
+pub static DIRMETA_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_DIRMETA_GVARIANT_STRING)};
#[doc(alias = "OSTREE_FILEMETA_GVARIANT_STRING")]
-pub static FILEMETA_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_FILEMETA_GVARIANT_STRING).to_str().unwrap()});
+pub static FILEMETA_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_FILEMETA_GVARIANT_STRING)};
#[doc(alias = "OSTREE_GPG_KEY_GVARIANT_STRING")]
-pub static GPG_KEY_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_GPG_KEY_GVARIANT_STRING).to_str().unwrap()});
-#[cfg(any(feature = "v2021_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+pub static GPG_KEY_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_GPG_KEY_GVARIANT_STRING)};
+#[cfg(feature = "v2021_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
#[doc(alias = "OSTREE_METADATA_KEY_BOOTABLE")]
-pub static METADATA_KEY_BOOTABLE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_METADATA_KEY_BOOTABLE).to_str().unwrap()});
-#[cfg(any(feature = "v2021_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+pub static METADATA_KEY_BOOTABLE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_METADATA_KEY_BOOTABLE)};
+#[cfg(feature = "v2021_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
#[doc(alias = "OSTREE_METADATA_KEY_LINUX")]
-pub static METADATA_KEY_LINUX: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_METADATA_KEY_LINUX).to_str().unwrap()});
-#[cfg(any(feature = "v2018_9", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+pub static METADATA_KEY_LINUX: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_METADATA_KEY_LINUX)};
+#[cfg(feature = "v2018_9")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
#[doc(alias = "OSTREE_META_KEY_DEPLOY_COLLECTION_ID")]
-pub static META_KEY_DEPLOY_COLLECTION_ID: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_META_KEY_DEPLOY_COLLECTION_ID).to_str().unwrap()});
-#[cfg(any(feature = "v2018_3", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+pub static META_KEY_DEPLOY_COLLECTION_ID: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_META_KEY_DEPLOY_COLLECTION_ID)};
+#[cfg(feature = "v2018_3")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
#[doc(alias = "OSTREE_ORIGIN_TRANSIENT_GROUP")]
-pub static ORIGIN_TRANSIENT_GROUP: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_ORIGIN_TRANSIENT_GROUP).to_str().unwrap()});
-#[cfg(any(feature = "v2022_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_2")))]
+pub static ORIGIN_TRANSIENT_GROUP: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_ORIGIN_TRANSIENT_GROUP)};
+#[cfg(feature = "v2022_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2022_2")))]
#[doc(alias = "OSTREE_PATH_BOOTED")]
-pub static PATH_BOOTED: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_PATH_BOOTED).to_str().unwrap()});
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+pub static PATH_BOOTED: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_PATH_BOOTED)};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "OSTREE_REPO_METADATA_REF")]
-pub static REPO_METADATA_REF: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_REPO_METADATA_REF).to_str().unwrap()});
-#[cfg(any(feature = "v2020_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
+pub static REPO_METADATA_REF: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_REPO_METADATA_REF)};
+#[cfg(feature = "v2020_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
#[doc(alias = "OSTREE_SIGN_NAME_ED25519")]
-pub static SIGN_NAME_ED25519: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_SIGN_NAME_ED25519).to_str().unwrap()});
+pub static SIGN_NAME_ED25519: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SIGN_NAME_ED25519)};
#[doc(alias = "OSTREE_SUMMARY_GVARIANT_STRING")]
-pub static SUMMARY_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_SUMMARY_GVARIANT_STRING).to_str().unwrap()});
+pub static SUMMARY_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SUMMARY_GVARIANT_STRING)};
#[doc(alias = "OSTREE_SUMMARY_SIG_GVARIANT_STRING")]
-pub static SUMMARY_SIG_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_SUMMARY_SIG_GVARIANT_STRING).to_str().unwrap()});
+pub static SUMMARY_SIG_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SUMMARY_SIG_GVARIANT_STRING)};
#[doc(alias = "OSTREE_TREE_GVARIANT_STRING")]
-pub static TREE_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_TREE_GVARIANT_STRING).to_str().unwrap()});
+pub static TREE_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_TREE_GVARIANT_STRING)};
// from gir-files
// DO NOT EDIT
-use glib::object::IsA;
-use glib::translate::*;
-use std::fmt;
-use std::ptr;
+use crate::{ffi};
+use glib::{prelude::*,translate::*};
glib::wrapper! {
#[doc(alias = "OstreeContentWriter")]
#[doc(alias = "ostree_content_writer_finish")]
pub fn finish(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_content_writer_finish(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
}
-
-impl fmt::Display for ContentWriter {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("ContentWriter")
- }
-}
// from gir-files
// DO NOT EDIT
-use crate::BootconfigParser;
-#[cfg(any(feature = "v2016_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
-use crate::DeploymentUnlockedState;
-use glib::translate::*;
-use std::fmt;
+use crate::{ffi,BootconfigParser};
+#[cfg(feature = "v2016_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
+use crate::{DeploymentUnlockedState};
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeDeployment")]
}
}
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
#[doc(alias = "ostree_deployment_get_unlocked")]
#[doc(alias = "get_unlocked")]
pub fn unlocked(&self) -> DeploymentUnlockedState {
}
}
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2023_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_8")))]
+ #[doc(alias = "ostree_deployment_is_finalization_locked")]
+ pub fn is_finalization_locked(&self) -> bool {
+ unsafe {
+ from_glib(ffi::ostree_deployment_is_finalization_locked(self.to_glib_none().0))
+ }
+ }
+
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
#[doc(alias = "ostree_deployment_is_pinned")]
pub fn is_pinned(&self) -> bool {
unsafe {
}
}
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
#[doc(alias = "ostree_deployment_is_staged")]
pub fn is_staged(&self) -> bool {
unsafe {
}
}
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
#[doc(alias = "ostree_deployment_origin_remove_transient_state")]
pub fn origin_remove_transient_state(origin: &glib::KeyFile) {
unsafe {
}
}
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
#[doc(alias = "ostree_deployment_unlocked_state_to_string")]
pub fn unlocked_state_to_string(state: DeploymentUnlockedState) -> glib::GString {
unsafe {
}
}
}
-
-impl fmt::Display for Deployment {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("Deployment")
- }
-}
// from gir-files
// DO NOT EDIT
+use crate::{ffi};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
// from gir-files
// DO NOT EDIT
-use glib::translate::*;
-use std::fmt;
+use crate::{ffi};
+use glib::{translate::*};
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
__Unknown(i32),
}
-impl fmt::Display for DeploymentUnlockedState {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "DeploymentUnlockedState::{}", match *self {
- Self::None => "None",
- Self::Development => "Development",
- Self::Hotfix => "Hotfix",
- Self::Transient => "Transient",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for DeploymentUnlockedState {
type GlibType = ffi::OstreeDeploymentUnlockedState;
- fn into_glib(self) -> ffi::OstreeDeploymentUnlockedState {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeDeploymentUnlockedState {
+match self {
Self::None => ffi::OSTREE_DEPLOYMENT_UNLOCKED_NONE,
Self::Development => ffi::OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT,
Self::Hotfix => ffi::OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX,
Self::Transient => ffi::OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeDeploymentUnlockedState> for DeploymentUnlockedState {
- unsafe fn from_glib(value: ffi::OstreeDeploymentUnlockedState) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeDeploymentUnlockedState) -> Self {
+
+match value {
ffi::OSTREE_DEPLOYMENT_UNLOCKED_NONE => Self::None,
ffi::OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT => Self::Development,
ffi::OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX => Self::Hotfix,
ffi::OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT => Self::Transient,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for GpgSignatureAttr {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "GpgSignatureAttr::{}", match *self {
- Self::Valid => "Valid",
- Self::SigExpired => "SigExpired",
- Self::KeyExpired => "KeyExpired",
- Self::KeyRevoked => "KeyRevoked",
- Self::KeyMissing => "KeyMissing",
- Self::Fingerprint => "Fingerprint",
- Self::Timestamp => "Timestamp",
- Self::ExpTimestamp => "ExpTimestamp",
- Self::PubkeyAlgoName => "PubkeyAlgoName",
- Self::HashAlgoName => "HashAlgoName",
- Self::UserName => "UserName",
- Self::UserEmail => "UserEmail",
- Self::FingerprintPrimary => "FingerprintPrimary",
- Self::KeyExpTimestamp => "KeyExpTimestamp",
- Self::KeyExpTimestampPrimary => "KeyExpTimestampPrimary",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for GpgSignatureAttr {
type GlibType = ffi::OstreeGpgSignatureAttr;
fn into_glib(self) -> ffi::OstreeGpgSignatureAttr {
- match self {
+match self {
Self::Valid => ffi::OSTREE_GPG_SIGNATURE_ATTR_VALID,
Self::SigExpired => ffi::OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED,
Self::KeyExpired => ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED,
Self::KeyExpTimestampPrimary => ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeGpgSignatureAttr> for GpgSignatureAttr {
unsafe fn from_glib(value: ffi::OstreeGpgSignatureAttr) -> Self {
- match value {
+
+match value {
ffi::OSTREE_GPG_SIGNATURE_ATTR_VALID => Self::Valid,
ffi::OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED => Self::SigExpired,
ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED => Self::KeyExpired,
ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY => Self::KeyExpTimestampPrimary,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for ObjectType {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "ObjectType::{}", match *self {
- Self::File => "File",
- Self::DirTree => "DirTree",
- Self::DirMeta => "DirMeta",
- Self::Commit => "Commit",
- Self::TombstoneCommit => "TombstoneCommit",
- Self::CommitMeta => "CommitMeta",
- Self::PayloadLink => "PayloadLink",
- Self::FileXattrs => "FileXattrs",
- Self::FileXattrsLink => "FileXattrsLink",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for ObjectType {
type GlibType = ffi::OstreeObjectType;
- fn into_glib(self) -> ffi::OstreeObjectType {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeObjectType {
+match self {
Self::File => ffi::OSTREE_OBJECT_TYPE_FILE,
Self::DirTree => ffi::OSTREE_OBJECT_TYPE_DIR_TREE,
Self::DirMeta => ffi::OSTREE_OBJECT_TYPE_DIR_META,
Self::FileXattrsLink => ffi::OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeObjectType> for ObjectType {
- unsafe fn from_glib(value: ffi::OstreeObjectType) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeObjectType) -> Self {
+
+match value {
ffi::OSTREE_OBJECT_TYPE_FILE => Self::File,
ffi::OSTREE_OBJECT_TYPE_DIR_TREE => Self::DirTree,
ffi::OSTREE_OBJECT_TYPE_DIR_META => Self::DirMeta,
ffi::OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK => Self::FileXattrsLink,
value => Self::__Unknown(value),
}
- }
+}
}
-#[cfg(any(feature = "v2018_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
+#[cfg(feature = "v2018_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
__Unknown(i32),
}
-#[cfg(any(feature = "v2018_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
-impl fmt::Display for RepoCheckoutFilterResult {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoCheckoutFilterResult::{}", match *self {
- Self::Allow => "Allow",
- Self::Skip => "Skip",
- _ => "Unknown",
- })
- }
-}
-
-#[cfg(any(feature = "v2018_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
+#[cfg(feature = "v2018_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
#[doc(hidden)]
impl IntoGlib for RepoCheckoutFilterResult {
type GlibType = ffi::OstreeRepoCheckoutFilterResult;
- fn into_glib(self) -> ffi::OstreeRepoCheckoutFilterResult {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoCheckoutFilterResult {
+match self {
Self::Allow => ffi::OSTREE_REPO_CHECKOUT_FILTER_ALLOW,
Self::Skip => ffi::OSTREE_REPO_CHECKOUT_FILTER_SKIP,
Self::__Unknown(value) => value,
}
- }
+}
}
-#[cfg(any(feature = "v2018_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
+#[cfg(feature = "v2018_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCheckoutFilterResult> for RepoCheckoutFilterResult {
- unsafe fn from_glib(value: ffi::OstreeRepoCheckoutFilterResult) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoCheckoutFilterResult) -> Self {
+
+match value {
ffi::OSTREE_REPO_CHECKOUT_FILTER_ALLOW => Self::Allow,
ffi::OSTREE_REPO_CHECKOUT_FILTER_SKIP => Self::Skip,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for RepoCheckoutMode {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoCheckoutMode::{}", match *self {
- Self::None => "None",
- Self::User => "User",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoCheckoutMode {
type GlibType = ffi::OstreeRepoCheckoutMode;
- fn into_glib(self) -> ffi::OstreeRepoCheckoutMode {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoCheckoutMode {
+match self {
Self::None => ffi::OSTREE_REPO_CHECKOUT_MODE_NONE,
Self::User => ffi::OSTREE_REPO_CHECKOUT_MODE_USER,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCheckoutMode> for RepoCheckoutMode {
- unsafe fn from_glib(value: ffi::OstreeRepoCheckoutMode) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoCheckoutMode) -> Self {
+
+match value {
ffi::OSTREE_REPO_CHECKOUT_MODE_NONE => Self::None,
ffi::OSTREE_REPO_CHECKOUT_MODE_USER => Self::User,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for RepoCheckoutOverwriteMode {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoCheckoutOverwriteMode::{}", match *self {
- Self::None => "None",
- Self::UnionFiles => "UnionFiles",
- Self::AddFiles => "AddFiles",
- Self::UnionIdentical => "UnionIdentical",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoCheckoutOverwriteMode {
type GlibType = ffi::OstreeRepoCheckoutOverwriteMode;
- fn into_glib(self) -> ffi::OstreeRepoCheckoutOverwriteMode {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoCheckoutOverwriteMode {
+match self {
Self::None => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_NONE,
Self::UnionFiles => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES,
Self::AddFiles => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES,
Self::UnionIdentical => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCheckoutOverwriteMode> for RepoCheckoutOverwriteMode {
- unsafe fn from_glib(value: ffi::OstreeRepoCheckoutOverwriteMode) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoCheckoutOverwriteMode) -> Self {
+
+match value {
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_NONE => Self::None,
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES => Self::UnionFiles,
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES => Self::AddFiles,
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL => Self::UnionIdentical,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for RepoCommitFilterResult {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoCommitFilterResult::{}", match *self {
- Self::Allow => "Allow",
- Self::Skip => "Skip",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoCommitFilterResult {
type GlibType = ffi::OstreeRepoCommitFilterResult;
- fn into_glib(self) -> ffi::OstreeRepoCommitFilterResult {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoCommitFilterResult {
+match self {
Self::Allow => ffi::OSTREE_REPO_COMMIT_FILTER_ALLOW,
Self::Skip => ffi::OSTREE_REPO_COMMIT_FILTER_SKIP,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitFilterResult> for RepoCommitFilterResult {
- unsafe fn from_glib(value: ffi::OstreeRepoCommitFilterResult) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoCommitFilterResult) -> Self {
+
+match value {
ffi::OSTREE_REPO_COMMIT_FILTER_ALLOW => Self::Allow,
ffi::OSTREE_REPO_COMMIT_FILTER_SKIP => Self::Skip,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for RepoCommitIterResult {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoCommitIterResult::{}", match *self {
- Self::Error => "Error",
- Self::End => "End",
- Self::File => "File",
- Self::Dir => "Dir",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoCommitIterResult {
type GlibType = ffi::OstreeRepoCommitIterResult;
- fn into_glib(self) -> ffi::OstreeRepoCommitIterResult {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoCommitIterResult {
+match self {
Self::Error => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_ERROR,
Self::End => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_END,
Self::File => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_FILE,
Self::Dir => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_DIR,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitIterResult> for RepoCommitIterResult {
- unsafe fn from_glib(value: ffi::OstreeRepoCommitIterResult) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoCommitIterResult) -> Self {
+
+match value {
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_ERROR => Self::Error,
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_END => Self::End,
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_FILE => Self::File,
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_DIR => Self::Dir,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for RepoMode {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoMode::{}", match *self {
- Self::Bare => "Bare",
- Self::Archive => "Archive",
- Self::BareUser => "BareUser",
- Self::BareUserOnly => "BareUserOnly",
- Self::BareSplitXattrs => "BareSplitXattrs",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoMode {
type GlibType = ffi::OstreeRepoMode;
- fn into_glib(self) -> ffi::OstreeRepoMode {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoMode {
+match self {
Self::Bare => ffi::OSTREE_REPO_MODE_BARE,
Self::Archive => ffi::OSTREE_REPO_MODE_ARCHIVE,
Self::BareUser => ffi::OSTREE_REPO_MODE_BARE_USER,
Self::BareSplitXattrs => ffi::OSTREE_REPO_MODE_BARE_SPLIT_XATTRS,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoMode> for RepoMode {
- unsafe fn from_glib(value: ffi::OstreeRepoMode) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoMode) -> Self {
+
+match value {
ffi::OSTREE_REPO_MODE_BARE => Self::Bare,
ffi::OSTREE_REPO_MODE_ARCHIVE => Self::Archive,
ffi::OSTREE_REPO_MODE_BARE_USER => Self::BareUser,
ffi::OSTREE_REPO_MODE_BARE_SPLIT_XATTRS => Self::BareSplitXattrs,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for RepoRemoteChange {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "RepoRemoteChange::{}", match *self {
- Self::Add => "Add",
- Self::AddIfNotExists => "AddIfNotExists",
- Self::Delete => "Delete",
- Self::DeleteIfExists => "DeleteIfExists",
- Self::Replace => "Replace",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoRemoteChange {
type GlibType = ffi::OstreeRepoRemoteChange;
- fn into_glib(self) -> ffi::OstreeRepoRemoteChange {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeRepoRemoteChange {
+match self {
Self::Add => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD,
Self::AddIfNotExists => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
Self::Delete => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE,
Self::Replace => ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoRemoteChange> for RepoRemoteChange {
- unsafe fn from_glib(value: ffi::OstreeRepoRemoteChange) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeRepoRemoteChange) -> Self {
+
+match value {
ffi::OSTREE_REPO_REMOTE_CHANGE_ADD => Self::Add,
ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS => Self::AddIfNotExists,
ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE => Self::Delete,
ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE => Self::Replace,
value => Self::__Unknown(value),
}
- }
+}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
__Unknown(i32),
}
-impl fmt::Display for StaticDeltaGenerateOpt {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "StaticDeltaGenerateOpt::{}", match *self {
- Self::Lowlatency => "Lowlatency",
- Self::Major => "Major",
- _ => "Unknown",
- })
- }
-}
-
#[doc(hidden)]
impl IntoGlib for StaticDeltaGenerateOpt {
type GlibType = ffi::OstreeStaticDeltaGenerateOpt;
- fn into_glib(self) -> ffi::OstreeStaticDeltaGenerateOpt {
- match self {
+ #[inline]
+fn into_glib(self) -> ffi::OstreeStaticDeltaGenerateOpt {
+match self {
Self::Lowlatency => ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY,
Self::Major => ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR,
Self::__Unknown(value) => value,
}
- }
+}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeStaticDeltaGenerateOpt> for StaticDeltaGenerateOpt {
- unsafe fn from_glib(value: ffi::OstreeStaticDeltaGenerateOpt) -> Self {
- match value {
+ #[inline]
+unsafe fn from_glib(value: ffi::OstreeStaticDeltaGenerateOpt) -> Self {
+
+match value {
ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY => Self::Lowlatency,
ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR => Self::Major,
value => Self::__Unknown(value),
}
- }
+}
}
// from gir-files
// DO NOT EDIT
-use bitflags::bitflags;
-use glib::translate::*;
-use glib::value::FromValue;
-use glib::value::ToValue;
-use glib::StaticType;
-use glib::Type;
-use std::fmt;
-
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
+use crate::{ffi};
+use glib::{bitflags::bitflags,prelude::*,translate::*};
+
+#[cfg(feature = "v2017_13")]
bitflags! {
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeChecksumFlags")]
pub struct ChecksumFlags: u32 {
#[doc(alias = "OSTREE_CHECKSUM_FLAGS_NONE")]
}
}
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
-impl fmt::Display for ChecksumFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+#[cfg(feature = "v2017_13")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
#[doc(hidden)]
impl IntoGlib for ChecksumFlags {
type GlibType = ffi::OstreeChecksumFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeChecksumFlags {
self.bits()
}
}
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+#[cfg(feature = "v2017_13")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeChecksumFlags> for ChecksumFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeChecksumFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeDiffFlags")]
pub struct DiffFlags: u32 {
#[doc(alias = "OSTREE_DIFF_FLAGS_NONE")]
}
}
-impl fmt::Display for DiffFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for DiffFlags {
type GlibType = ffi::OstreeDiffFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeDiffFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeDiffFlags> for DiffFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeDiffFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeGpgSignatureFormatFlags")]
pub struct GpgSignatureFormatFlags: u32 {
#[doc(alias = "OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT")]
}
}
-impl fmt::Display for GpgSignatureFormatFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for GpgSignatureFormatFlags {
type GlibType = ffi::OstreeGpgSignatureFormatFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeGpgSignatureFormatFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeGpgSignatureFormatFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoCommitModifierFlags")]
pub struct RepoCommitModifierFlags: u32 {
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE")]
const CONSUME = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL")]
const DEVINO_CANONICAL = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL as _;
- }
-}
-
-impl fmt::Display for RepoCommitModifierFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
+ #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1")]
+ const SELINUX_LABEL_V1 = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1 as _;
}
}
impl IntoGlib for RepoCommitModifierFlags {
type GlibType = ffi::OstreeRepoCommitModifierFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoCommitModifierFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitModifierFlags> for RepoCommitModifierFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoCommitModifierFlags) -> Self {
Self::from_bits_truncate(value)
}
}
-#[cfg(any(feature = "v2015_7", feature = "dox"))]
+#[cfg(feature = "v2015_7")]
bitflags! {
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoCommitState")]
pub struct RepoCommitState: u32 {
#[doc(alias = "OSTREE_REPO_COMMIT_STATE_NORMAL")]
}
}
-#[cfg(any(feature = "v2015_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
-impl fmt::Display for RepoCommitState {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
-#[cfg(any(feature = "v2015_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
+#[cfg(feature = "v2015_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
#[doc(hidden)]
impl IntoGlib for RepoCommitState {
type GlibType = ffi::OstreeRepoCommitState;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoCommitState {
self.bits()
}
}
-#[cfg(any(feature = "v2015_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
+#[cfg(feature = "v2015_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitState> for RepoCommitState {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoCommitState) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoCommitTraverseFlags")]
pub struct RepoCommitTraverseFlags: u32 {
#[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE")]
}
}
-impl fmt::Display for RepoCommitTraverseFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoCommitTraverseFlags {
type GlibType = ffi::OstreeRepoCommitTraverseFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoCommitTraverseFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitTraverseFlags> for RepoCommitTraverseFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoCommitTraverseFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoListObjectsFlags")]
pub struct RepoListObjectsFlags: u32 {
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_LOOSE")]
}
}
-impl fmt::Display for RepoListObjectsFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoListObjectsFlags {
type GlibType = ffi::OstreeRepoListObjectsFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoListObjectsFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoListObjectsFlags> for RepoListObjectsFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoListObjectsFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoListRefsExtFlags")]
pub struct RepoListRefsExtFlags: u32 {
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_NONE")]
}
}
-impl fmt::Display for RepoListRefsExtFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoListRefsExtFlags {
type GlibType = ffi::OstreeRepoListRefsExtFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoListRefsExtFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoListRefsExtFlags> for RepoListRefsExtFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoListRefsExtFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoPruneFlags")]
pub struct RepoPruneFlags: u32 {
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NONE")]
}
}
-impl fmt::Display for RepoPruneFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoPruneFlags {
type GlibType = ffi::OstreeRepoPruneFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoPruneFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoPruneFlags> for RepoPruneFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoPruneFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoPullFlags")]
pub struct RepoPullFlags: u32 {
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_NONE")]
}
}
-impl fmt::Display for RepoPullFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoPullFlags {
type GlibType = ffi::OstreeRepoPullFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoPullFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoPullFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoResolveRevExtFlags")]
pub struct RepoResolveRevExtFlags: u32 {
#[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_NONE")]
}
}
-impl fmt::Display for RepoResolveRevExtFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for RepoResolveRevExtFlags {
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoResolveRevExtFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
Self::from_bits_truncate(value)
}
}
-#[cfg(any(feature = "v2021_4", feature = "dox"))]
+#[cfg(feature = "v2021_4")]
bitflags! {
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeRepoVerifyFlags")]
pub struct RepoVerifyFlags: u32 {
#[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NONE")]
}
}
-#[cfg(any(feature = "v2021_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
-impl fmt::Display for RepoVerifyFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
-#[cfg(any(feature = "v2021_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+#[cfg(feature = "v2021_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
#[doc(hidden)]
impl IntoGlib for RepoVerifyFlags {
type GlibType = ffi::OstreeRepoVerifyFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeRepoVerifyFlags {
self.bits()
}
}
-#[cfg(any(feature = "v2021_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+#[cfg(feature = "v2021_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoVerifyFlags> for RepoVerifyFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeRepoVerifyFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeSePolicyRestoreconFlags")]
pub struct SePolicyRestoreconFlags: u32 {
#[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE")]
}
}
-impl fmt::Display for SePolicyRestoreconFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for SePolicyRestoreconFlags {
type GlibType = ffi::OstreeSePolicyRestoreconFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeSePolicyRestoreconFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSePolicyRestoreconFlags> for SePolicyRestoreconFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeSePolicyRestoreconFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeSysrootSimpleWriteDeploymentFlags")]
pub struct SysrootSimpleWriteDeploymentFlags: u32 {
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE")]
}
}
-impl fmt::Display for SysrootSimpleWriteDeploymentFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for SysrootSimpleWriteDeploymentFlags {
type GlibType = ffi::OstreeSysrootSimpleWriteDeploymentFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeSysrootSimpleWriteDeploymentFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootSimpleWriteDeploymentFlags> for SysrootSimpleWriteDeploymentFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeSysrootSimpleWriteDeploymentFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeSysrootUpgraderFlags")]
pub struct SysrootUpgraderFlags: u32 {
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED")]
const IGNORE_UNCONFIGURED = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED as _;
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE")]
const STAGE = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE as _;
- }
-}
-
-impl fmt::Display for SysrootUpgraderFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
+ #[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC")]
+ const KEXEC = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC as _;
}
}
impl IntoGlib for SysrootUpgraderFlags {
type GlibType = ffi::OstreeSysrootUpgraderFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeSysrootUpgraderFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootUpgraderFlags> for SysrootUpgraderFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderFlags) -> Self {
Self::from_bits_truncate(value)
}
}
impl StaticType for SysrootUpgraderFlags {
- fn static_type() -> Type {
- unsafe { from_glib(ffi::ostree_sysroot_upgrader_flags_get_type()) }
- }
+ #[inline]
+ #[doc(alias = "ostree_sysroot_upgrader_flags_get_type")]
+ fn static_type() -> glib::Type {
+ unsafe { from_glib(ffi::ostree_sysroot_upgrader_flags_get_type()) }
+ }
+ }
+
+impl glib::HasParamSpec for SysrootUpgraderFlags {
+ type ParamSpec = glib::ParamSpecFlags;
+ type SetValue = Self;
+ type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
+
+ fn param_spec_builder() -> Self::BuilderFn {
+ Self::ParamSpec::builder
+ }
}
impl glib::value::ValueType for SysrootUpgraderFlags {
type Type = Self;
}
-unsafe impl<'a> FromValue<'a> for SysrootUpgraderFlags {
+unsafe impl<'a> glib::value::FromValue<'a> for SysrootUpgraderFlags {
type Checker = glib::value::GenericValueTypeChecker<Self>;
+ #[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for SysrootUpgraderFlags {
+ #[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
value
}
+ #[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "OstreeSysrootUpgraderPullFlags")]
pub struct SysrootUpgraderPullFlags: u32 {
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE")]
}
}
-impl fmt::Display for SysrootUpgraderPullFlags {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- <Self as fmt::Debug>::fmt(self, f)
- }
-}
-
#[doc(hidden)]
impl IntoGlib for SysrootUpgraderPullFlags {
type GlibType = ffi::OstreeSysrootUpgraderPullFlags;
+ #[inline]
fn into_glib(self) -> ffi::OstreeSysrootUpgraderPullFlags {
self.bits()
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootUpgraderPullFlags> for SysrootUpgraderPullFlags {
+ #[inline]
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderPullFlags) -> Self {
Self::from_bits_truncate(value)
}
// from gir-files
// DO NOT EDIT
-#[cfg(any(feature = "v2020_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
-use crate::CommitSizesEntry;
-use crate::DiffFlags;
-use crate::DiffItem;
-use crate::ObjectType;
-use glib::object::IsA;
-use glib::translate::*;
-use std::mem;
-use std::ptr;
-
-
-#[cfg(any(feature = "v2017_15", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
+use crate::{ffi,DiffFlags,DiffItem,ObjectType};
+#[cfg(feature = "v2020_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
+use crate::{CommitSizesEntry};
+use glib::{prelude::*,translate::*};
+
+
+#[cfg(feature = "v2017_15")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
#[doc(alias = "ostree_break_hardlink")]
pub fn break_hardlink(dfd: i32, path: &str, skip_xattrs: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_break_hardlink(dfd, path.to_glib_none().0, skip_xattrs.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
-#[cfg(any(feature = "v2017_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+#[cfg(feature = "v2017_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
#[doc(alias = "ostree_check_version")]
pub fn check_version(required_year: u32, required_release: u32) -> bool {
unsafe {
}
}
-#[cfg(any(feature = "v2018_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
+#[cfg(feature = "v2018_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
#[doc(alias = "ostree_commit_get_content_checksum")]
pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<glib::GString> {
unsafe {
}
}
-#[cfg(any(feature = "v2020_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+#[cfg(feature = "v2020_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
#[doc(alias = "ostree_commit_get_object_sizes")]
pub fn commit_get_object_sizes(commit_variant: &glib::Variant) -> Result<Vec<CommitSizesEntry>, glib::Error> {
unsafe {
- let mut out_sizes_entries = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_sizes_entries = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_commit_get_object_sizes(commit_variant.to_glib_none().0, &mut out_sizes_entries, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_sizes_entries)) } else { Err(from_glib_full(error)) }
}
}
}
}
-#[cfg(any(feature = "v2016_3", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_3")))]
+#[cfg(feature = "v2016_3")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2016_3")))]
#[doc(alias = "ostree_commit_get_timestamp")]
pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
unsafe {
}
}
-//#[cfg(any(feature = "v2021_1", feature = "dox"))]
-//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+//#[cfg(feature = "v2021_1")]
+//#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
//#[doc(alias = "ostree_commit_metadata_for_bootable")]
//pub fn commit_metadata_for_bootable(root: &impl IsA<gio::File>, dict: /*Ignored*/&glib::VariantDict, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_commit_metadata_for_bootable() }
#[doc(alias = "ostree_content_file_parse")]
pub fn content_file_parse(compressed: bool, content_path: &impl IsA<gio::File>, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut out_file_info = ptr::null_mut();
- let mut out_xattrs = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut out_file_info = std::ptr::null_mut();
+ let mut out_xattrs = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_content_file_parse(compressed.into_glib(), content_path.as_ref().to_glib_none().0, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_content_file_parse_at")]
pub fn content_file_parse_at(compressed: bool, parent_dfd: i32, path: &str, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut out_file_info = ptr::null_mut();
- let mut out_xattrs = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut out_file_info = std::ptr::null_mut();
+ let mut out_xattrs = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_content_file_parse_at(compressed.into_glib(), parent_dfd, path.to_glib_none().0, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_content_stream_parse")]
pub fn content_stream_parse(compressed: bool, input: &impl IsA<gio::InputStream>, input_length: u64, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut out_file_info = ptr::null_mut();
- let mut out_xattrs = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut out_file_info = std::ptr::null_mut();
+ let mut out_xattrs = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_content_stream_parse(compressed.into_glib(), input.as_ref().to_glib_none().0, input_length, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_diff_dirs")]
pub fn diff_dirs(flags: DiffFlags, a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[&DiffItem], removed: &[gio::File], added: &[gio::File], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_diff_dirs(flags.into_glib(), a.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0, modified.to_glib_none().0, removed.to_glib_none().0, added.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
-//#[cfg(any(feature = "v2017_4", feature = "dox"))]
-//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+//#[cfg(feature = "v2017_4")]
+//#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
//#[doc(alias = "ostree_diff_dirs_with_options")]
//pub fn diff_dirs_with_options(flags: DiffFlags, a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[&DiffItem], removed: &[gio::File], added: &[gio::File], options: /*Ignored*/Option<&mut DiffDirsOptions>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_diff_dirs_with_options() }
#[doc(alias = "ostree_fs_get_all_xattrs")]
pub fn fs_get_all_xattrs(fd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_fs_get_all_xattrs(fd, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_fs_get_all_xattrs_at")]
pub fn fs_get_all_xattrs_at(dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_fs_get_all_xattrs_at(dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
-#[cfg(any(feature = "v2017_10", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+#[cfg(feature = "v2017_10")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
#[doc(alias = "ostree_gpg_error_quark")]
pub fn gpg_error_quark() -> glib::Quark {
unsafe {
#[doc(alias = "ostree_object_from_string")]
pub fn object_from_string(str: &str) -> (glib::GString, ObjectType) {
unsafe {
- let mut out_checksum = ptr::null_mut();
- let mut out_objtype = mem::MaybeUninit::uninit();
+ let mut out_checksum = std::ptr::null_mut();
+ let mut out_objtype = std::mem::MaybeUninit::uninit();
ffi::ostree_object_from_string(str.to_glib_none().0, &mut out_checksum, out_objtype.as_mut_ptr());
(from_glib_full(out_checksum), from_glib(out_objtype.assume_init()))
}
#[doc(alias = "ostree_object_name_deserialize")]
pub fn object_name_deserialize(variant: &glib::Variant) -> (glib::GString, ObjectType) {
unsafe {
- let mut out_checksum = ptr::null();
- let mut out_objtype = mem::MaybeUninit::uninit();
+ let mut out_checksum = std::ptr::null();
+ let mut out_objtype = std::mem::MaybeUninit::uninit();
ffi::ostree_object_name_deserialize(variant.to_glib_none().0, &mut out_checksum, out_objtype.as_mut_ptr());
(from_glib_none(out_checksum), from_glib(out_objtype.assume_init()))
}
#[doc(alias = "ostree_parse_refspec")]
pub fn parse_refspec(refspec: &str) -> Result<(Option<glib::GString>, glib::GString), glib::Error> {
unsafe {
- let mut out_remote = ptr::null_mut();
- let mut out_ref = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_remote = std::ptr::null_mut();
+ let mut out_ref = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_parse_refspec(refspec.to_glib_none().0, &mut out_remote, &mut out_ref, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_remote), from_glib_full(out_ref))) } else { Err(from_glib_full(error)) }
}
}
-#[cfg(any(feature = "v2016_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+#[cfg(feature = "v2016_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
#[doc(alias = "ostree_raw_file_to_archive_z2_stream")]
pub fn raw_file_to_archive_z2_stream(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::InputStream, glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_raw_file_to_archive_z2_stream(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, &mut out_input, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_input)) } else { Err(from_glib_full(error)) }
}
}
-#[cfg(any(feature = "v2017_3", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_3")))]
+#[cfg(feature = "v2017_3")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_3")))]
#[doc(alias = "ostree_raw_file_to_archive_z2_stream_with_options")]
pub fn raw_file_to_archive_z2_stream_with_options(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::InputStream, glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_raw_file_to_archive_z2_stream_with_options(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, options.to_glib_none().0, &mut out_input, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_input)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_raw_file_to_content_stream")]
pub fn raw_file_to_content_stream(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, u64), glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut out_length = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut out_length = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_raw_file_to_content_stream(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, &mut out_input, out_length.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_input), out_length.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_checksum_string")]
pub fn validate_checksum_string(sha256: &str) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_checksum_string(sha256.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_validate_collection_id")]
pub fn validate_collection_id(collection_id: Option<&str>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_collection_id(collection_id.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
-#[cfg(any(feature = "v2017_8", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_8")))]
+#[cfg(feature = "v2017_8")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_8")))]
#[doc(alias = "ostree_validate_remote_name")]
pub fn validate_remote_name(remote_name: &str) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_remote_name(remote_name.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_rev")]
pub fn validate_rev(rev: &str) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_rev(rev.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_checksum_string")]
pub fn validate_structureof_checksum_string(checksum: &str) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_checksum_string(checksum.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_commit")]
pub fn validate_structureof_commit(commit: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_commit(commit.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_csum_v")]
pub fn validate_structureof_csum_v(checksum: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_csum_v(checksum.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_dirmeta")]
pub fn validate_structureof_dirmeta(dirmeta: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_dirmeta(dirmeta.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_dirtree")]
pub fn validate_structureof_dirtree(dirtree: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_dirtree(dirtree.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_file_mode")]
pub fn validate_structureof_file_mode(mode: u32) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_file_mode(mode, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_validate_structureof_objtype")]
pub fn validate_structureof_objtype(objtype: u8) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_validate_structureof_objtype(objtype, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
// from gir-files
// DO NOT EDIT
-use glib::translate::*;
-use std::fmt;
-use std::mem;
-#[cfg(any(feature = "v2016_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
-use std::ptr;
+use crate::{ffi};
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeGpgVerifyResult")]
#[doc(alias = "ostree_gpg_verify_result_lookup")]
pub fn lookup(&self, key_id: &str) -> Option<u32> {
unsafe {
- let mut out_signature_index = mem::MaybeUninit::uninit();
+ let mut out_signature_index = std::mem::MaybeUninit::uninit();
let ret = from_glib(ffi::ostree_gpg_verify_result_lookup(self.to_glib_none().0, key_id.to_glib_none().0, out_signature_index.as_mut_ptr()));
if ret { Some(out_signature_index.assume_init()) } else { None }
}
}
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
#[doc(alias = "ostree_gpg_verify_result_require_valid_signature")]
pub fn require_valid_signature(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_gpg_verify_result_require_valid_signature(self.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
}
-
-impl fmt::Display for GpgVerifyResult {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("GpgVerifyResult")
- }
-}
mod sysroot_upgrader;
pub use self::sysroot_upgrader::SysrootUpgrader;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
mod collection_ref;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub use self::collection_ref::CollectionRef;
-#[cfg(any(feature = "v2020_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+#[cfg(feature = "v2020_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
mod commit_sizes_entry;
-#[cfg(any(feature = "v2020_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+#[cfg(feature = "v2020_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub use self::commit_sizes_entry::CommitSizesEntry;
mod diff_item;
pub use self::diff_item::DiffItem;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
mod remote;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub use self::remote::Remote;
mod repo_commit_modifier;
mod repo_dev_ino_cache;
pub use self::repo_dev_ino_cache::RepoDevInoCache;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
mod repo_finder_result;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub use self::repo_finder_result::RepoFinderResult;
mod enums;
pub use self::enums::DeploymentUnlockedState;
pub use self::enums::GpgSignatureAttr;
pub use self::enums::ObjectType;
-#[cfg(any(feature = "v2018_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
+#[cfg(feature = "v2018_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
pub use self::enums::RepoCheckoutFilterResult;
pub use self::enums::RepoCheckoutMode;
pub use self::enums::RepoCheckoutOverwriteMode;
pub use self::enums::StaticDeltaGenerateOpt;
mod flags;
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+#[cfg(feature = "v2017_13")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
pub use self::flags::ChecksumFlags;
pub use self::flags::DiffFlags;
pub use self::flags::GpgSignatureFormatFlags;
pub use self::flags::RepoCommitModifierFlags;
-#[cfg(any(feature = "v2015_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
+#[cfg(feature = "v2015_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
pub use self::flags::RepoCommitState;
pub use self::flags::RepoCommitTraverseFlags;
pub use self::flags::RepoListObjectsFlags;
pub use self::flags::RepoPruneFlags;
pub use self::flags::RepoPullFlags;
pub use self::flags::RepoResolveRevExtFlags;
-#[cfg(any(feature = "v2021_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+#[cfg(feature = "v2021_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
pub use self::flags::RepoVerifyFlags;
pub use self::flags::SePolicyRestoreconFlags;
pub use self::flags::SysrootSimpleWriteDeploymentFlags;
pub use self::flags::SysrootUpgraderFlags;
pub use self::flags::SysrootUpgraderPullFlags;
-pub mod functions;
+pub(crate) mod functions;
mod constants;
pub use self::constants::COMMIT_GVARIANT_STRING;
-#[cfg(any(feature = "v2020_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
+#[cfg(feature = "v2020_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
pub use self::constants::COMMIT_META_KEY_ARCHITECTURE;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub use self::constants::COMMIT_META_KEY_COLLECTION_BINDING;
-#[cfg(any(feature = "v2017_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+#[cfg(feature = "v2017_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
pub use self::constants::COMMIT_META_KEY_ENDOFLIFE;
-#[cfg(any(feature = "v2017_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+#[cfg(feature = "v2017_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
pub use self::constants::COMMIT_META_KEY_ENDOFLIFE_REBASE;
-#[cfg(any(feature = "v2017_9", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_9")))]
+#[cfg(feature = "v2017_9")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_9")))]
pub use self::constants::COMMIT_META_KEY_REF_BINDING;
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+#[cfg(feature = "v2017_13")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
pub use self::constants::COMMIT_META_KEY_SOURCE_TITLE;
-#[cfg(any(feature = "v2014_9", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2014_9")))]
+#[cfg(feature = "v2014_9")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2014_9")))]
pub use self::constants::COMMIT_META_KEY_VERSION;
pub use self::constants::DIRMETA_GVARIANT_STRING;
pub use self::constants::FILEMETA_GVARIANT_STRING;
pub use self::constants::GPG_KEY_GVARIANT_STRING;
-#[cfg(any(feature = "v2021_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+#[cfg(feature = "v2021_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
pub use self::constants::METADATA_KEY_BOOTABLE;
-#[cfg(any(feature = "v2021_1", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+#[cfg(feature = "v2021_1")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
pub use self::constants::METADATA_KEY_LINUX;
-#[cfg(any(feature = "v2018_9", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+#[cfg(feature = "v2018_9")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
-#[cfg(any(feature = "v2018_3", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+#[cfg(feature = "v2018_3")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
pub use self::constants::ORIGIN_TRANSIENT_GROUP;
-#[cfg(any(feature = "v2022_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_2")))]
+#[cfg(feature = "v2022_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2022_2")))]
pub use self::constants::PATH_BOOTED;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub use self::constants::REPO_METADATA_REF;
-#[cfg(any(feature = "v2020_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
+#[cfg(feature = "v2020_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
pub use self::constants::SIGN_NAME_ED25519;
pub use self::constants::SUMMARY_GVARIANT_STRING;
pub use self::constants::SUMMARY_SIG_GVARIANT_STRING;
pub use self::constants::TREE_GVARIANT_STRING;
-#[doc(hidden)]
-pub mod traits {
+pub(crate) mod traits {
pub use super::repo_finder::RepoFinderExt;
pub use super::sign::SignExt;
}
// from gir-files
// DO NOT EDIT
-#[cfg(any(feature = "v2018_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
-use crate::Repo;
-use glib::translate::*;
-use std::fmt;
-use std::ptr;
+use crate::{ffi};
+#[cfg(feature = "v2018_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
+use crate::{Repo};
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeMutableTree")]
}
}
- #[cfg(any(feature = "v2018_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
+ #[cfg(feature = "v2018_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
#[doc(alias = "ostree_mutable_tree_new_from_checksum")]
#[doc(alias = "new_from_checksum")]
pub fn from_checksum(repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> MutableTree {
}
}
- #[cfg(any(feature = "v2021_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_5")))]
+ #[cfg(feature = "v2021_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_5")))]
#[doc(alias = "ostree_mutable_tree_new_from_commit")]
#[doc(alias = "new_from_commit")]
pub fn from_commit(repo: &Repo, rev: &str) -> Result<MutableTree, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_mutable_tree_new_from_commit(repo.to_glib_none().0, rev.to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
+ #[cfg(feature = "v2018_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
#[doc(alias = "ostree_mutable_tree_check_error")]
pub fn check_error(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_check_error(self.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_mutable_tree_ensure_dir")]
pub fn ensure_dir(&self, name: &str) -> Result<MutableTree, glib::Error> {
unsafe {
- let mut out_subdir = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_subdir = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_ensure_dir(self.to_glib_none().0, name.to_glib_none().0, &mut out_subdir, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_subdir)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_mutable_tree_ensure_parent_dirs")]
pub fn ensure_parent_dirs(&self, split_path: &[&str], metadata_checksum: &str) -> Result<MutableTree, glib::Error> {
unsafe {
- let mut out_parent = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_parent = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_ensure_parent_dirs(self.to_glib_none().0, split_path.to_glib_none().0, metadata_checksum.to_glib_none().0, &mut out_parent, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_parent)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
+ #[cfg(feature = "v2018_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
#[doc(alias = "ostree_mutable_tree_fill_empty_from_dirtree")]
pub fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool {
unsafe {
#[doc(alias = "ostree_mutable_tree_lookup")]
pub fn lookup(&self, name: &str) -> Result<(Option<glib::GString>, Option<MutableTree>), glib::Error> {
unsafe {
- let mut out_file_checksum = ptr::null_mut();
- let mut out_subdir = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_file_checksum = std::ptr::null_mut();
+ let mut out_subdir = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_lookup(self.to_glib_none().0, name.to_glib_none().0, &mut out_file_checksum, &mut out_subdir, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_file_checksum), from_glib_full(out_subdir))) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_9", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+ #[cfg(feature = "v2018_9")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
#[doc(alias = "ostree_mutable_tree_remove")]
pub fn remove(&self, name: &str, allow_noent: bool) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_remove(self.to_glib_none().0, name.to_glib_none().0, allow_noent.into_glib(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_mutable_tree_replace_file")]
pub fn replace_file(&self, name: &str, checksum: &str) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_replace_file(self.to_glib_none().0, name.to_glib_none().0, checksum.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_mutable_tree_walk")]
pub fn walk(&self, split_path: &[&str], start: u32) -> Result<MutableTree, glib::Error> {
unsafe {
- let mut out_subdir = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_subdir = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_mutable_tree_walk(self.to_glib_none().0, split_path.to_glib_none().0, start, &mut out_subdir, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_subdir)) } else { Err(from_glib_full(error)) }
}
}
Self::new()
}
}
-
-impl fmt::Display for MutableTree {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("MutableTree")
- }
-}
// from gir-files
// DO NOT EDIT
-use glib::translate::*;
-use std::fmt;
+use crate::{ffi};
+use glib::{translate::*};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
}
}
-impl fmt::Display for Remote {
+impl std::fmt::Display for Remote {
#[inline]
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.write_str(&self.name())
}
}
// from gir-files
// DO NOT EDIT
-use crate::AsyncProgress;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use crate::CollectionRef;
-#[cfg(any(feature = "v2021_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
-use crate::ContentWriter;
-use crate::GpgVerifyResult;
-use crate::MutableTree;
-use crate::ObjectType;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use crate::Remote;
-#[cfg(any(feature = "v2016_8", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_8")))]
-use crate::RepoCheckoutAtOptions;
-use crate::RepoCheckoutMode;
-use crate::RepoCheckoutOverwriteMode;
-use crate::RepoCommitModifier;
-#[cfg(any(feature = "v2015_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
-use crate::RepoCommitState;
-use crate::RepoFile;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use crate::RepoFinderResult;
-use crate::RepoMode;
-use crate::RepoPruneFlags;
-use crate::RepoPullFlags;
-use crate::RepoRemoteChange;
-#[cfg(any(feature = "v2016_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_7")))]
-use crate::RepoResolveRevExtFlags;
-use crate::RepoTransactionStats;
-#[cfg(any(feature = "v2021_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
-use crate::RepoVerifyFlags;
-#[cfg(any(feature = "v2020_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
-use crate::Sign;
-use crate::StaticDeltaGenerateOpt;
-use glib::object::IsA;
-use glib::object::ObjectType as ObjectType_;
-use glib::signal::connect_raw;
-use glib::signal::SignalHandlerId;
-use glib::translate::*;
-use glib::StaticType;
-use std::boxed::Box as Box_;
-use std::fmt;
-use std::mem;
-use std::mem::transmute;
-use std::ptr;
+use crate::{ffi,AsyncProgress,GpgVerifyResult,MutableTree,ObjectType,RepoCheckoutMode,RepoCheckoutOverwriteMode,RepoCommitModifier,RepoFile,RepoMode,RepoPruneFlags,RepoPullFlags,RepoRemoteChange,RepoTransactionStats,StaticDeltaGenerateOpt};
+#[cfg(feature = "v2015_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
+use crate::{RepoCommitState};
+#[cfg(feature = "v2016_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2016_7")))]
+use crate::{RepoResolveRevExtFlags};
+#[cfg(feature = "v2016_8")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2016_8")))]
+use crate::{RepoCheckoutAtOptions};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use crate::{CollectionRef,Remote,RepoFinderResult};
+#[cfg(feature = "v2020_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
+use crate::{Sign};
+#[cfg(feature = "v2021_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
+use crate::{ContentWriter};
+#[cfg(feature = "v2021_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
+use crate::{RepoVerifyFlags};
+use glib::{object::ObjectType as _,prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
+use std::{boxed::Box as Box_};
glib::wrapper! {
#[doc(alias = "OstreeRepo")]
#[doc(alias = "ostree_repo_abort_transaction")]
pub fn abort_transaction(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_abort_transaction(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_add_gpg_signature_summary")]
pub fn add_gpg_signature_summary(&self, key_id: &[&str], homedir: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_add_gpg_signature_summary(self.to_glib_none().0, key_id.to_glib_none().0, homedir.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_append_gpg_signature")]
pub fn append_gpg_signature(&self, commit_checksum: &str, signature_bytes: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_append_gpg_signature(self.to_glib_none().0, commit_checksum.to_glib_none().0, signature_bytes.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_8")))]
+ #[cfg(feature = "v2016_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_8")))]
#[doc(alias = "ostree_repo_checkout_at")]
pub fn checkout_at(&self, options: Option<&RepoCheckoutAtOptions>, destination_dfd: i32, destination_path: impl AsRef<std::path::Path>, commit: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_checkout_at(self.to_glib_none().0, mut_override(options.to_glib_none().0), destination_dfd, destination_path.as_ref().to_glib_none().0, commit.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[doc(alias = "ostree_repo_checkout_composefs")]
+ pub fn checkout_composefs(&self, options: Option<&glib::Variant>, destination_dfd: i32, destination_path: &str, checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = std::ptr::null_mut();
+ let is_ok = ffi::ostree_repo_checkout_composefs(self.to_glib_none().0, options.to_glib_none().0, destination_dfd, destination_path.to_glib_none().0, checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_checkout_gc")]
pub fn checkout_gc(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_checkout_gc(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_checkout_tree")]
pub fn checkout_tree(&self, mode: RepoCheckoutMode, overwrite_mode: RepoCheckoutOverwriteMode, destination: &impl IsA<gio::File>, source: &RepoFile, source_info: &gio::FileInfo, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_checkout_tree(self.to_glib_none().0, mode.into_glib(), overwrite_mode.into_glib(), destination.as_ref().to_glib_none().0, source.to_glib_none().0, source_info.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
pub fn commit_transaction(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<RepoTransactionStats, glib::Error> {
unsafe {
let mut out_stats = RepoTransactionStats::uninitialized();
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_commit_transaction(self.to_glib_none().0, out_stats.to_glib_none_mut().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(out_stats) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_create")]
pub fn create(&self, mode: RepoMode, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_create(self.to_glib_none().0, mode.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_delete_object")]
pub fn delete_object(&self, objtype: ObjectType, sha256: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_delete_object(self.to_glib_none().0, objtype.into_glib(), sha256.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_12", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_12")))]
+ #[cfg(feature = "v2017_12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_12")))]
#[doc(alias = "ostree_repo_equal")]
pub fn equal(&self, b: &Repo) -> bool {
unsafe {
// unsafe { TODO: call ffi:ostree_repo_export_tree_to_archive() }
//}
- #[cfg(any(feature = "v2017_15", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
+ #[cfg(feature = "v2017_15")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
#[doc(alias = "ostree_repo_fsck_object")]
pub fn fsck_object(&self, objtype: ObjectType, sha256: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_fsck_object(self.to_glib_none().0, objtype.into_glib(), sha256.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2019_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_2")))]
+ #[cfg(feature = "v2019_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_2")))]
#[doc(alias = "ostree_repo_get_bootloader")]
#[doc(alias = "get_bootloader")]
pub fn bootloader(&self) -> glib::GString {
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_get_collection_id")]
#[doc(alias = "get_collection_id")]
pub fn collection_id(&self) -> Option<glib::GString> {
}
}
- #[cfg(any(feature = "v2018_9", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+ #[cfg(feature = "v2018_9")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
#[doc(alias = "ostree_repo_get_default_repo_finders")]
#[doc(alias = "get_default_repo_finders")]
pub fn default_repo_finders(&self) -> Vec<glib::GString> {
}
}
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
#[doc(alias = "ostree_repo_get_dfd")]
#[doc(alias = "get_dfd")]
pub fn dfd(&self) -> i32 {
}
}
- #[cfg(any(feature = "v2018_9", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+ #[cfg(feature = "v2018_9")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
#[doc(alias = "ostree_repo_get_min_free_space_bytes")]
#[doc(alias = "get_min_free_space_bytes")]
pub fn min_free_space_bytes(&self) -> Result<u64, glib::Error> {
unsafe {
- let mut out_reserved_bytes = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_reserved_bytes = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_get_min_free_space_bytes(self.to_glib_none().0, out_reserved_bytes.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(out_reserved_bytes.assume_init()) } else { Err(from_glib_full(error)) }
}
}
}
}
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
#[doc(alias = "ostree_repo_get_remote_boolean_option")]
#[doc(alias = "get_remote_boolean_option")]
pub fn remote_boolean_option(&self, remote_name: &str, option_name: &str, default_value: bool) -> Result<bool, glib::Error> {
unsafe {
- let mut out_value = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_value = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_get_remote_boolean_option(self.to_glib_none().0, remote_name.to_glib_none().0, option_name.to_glib_none().0, default_value.into_glib(), out_value.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_value.assume_init())) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
#[doc(alias = "ostree_repo_get_remote_list_option")]
#[doc(alias = "get_remote_list_option")]
pub fn remote_list_option(&self, remote_name: &str, option_name: &str) -> Result<Vec<glib::GString>, glib::Error> {
unsafe {
- let mut out_value = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_value = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_get_remote_list_option(self.to_glib_none().0, remote_name.to_glib_none().0, option_name.to_glib_none().0, &mut out_value, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(out_value)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
#[doc(alias = "ostree_repo_get_remote_option")]
#[doc(alias = "get_remote_option")]
pub fn remote_option(&self, remote_name: &str, option_name: &str, default_value: Option<&str>) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_value = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_value = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_get_remote_option(self.to_glib_none().0, remote_name.to_glib_none().0, option_name.to_glib_none().0, default_value.to_glib_none().0, &mut out_value, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_value)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_8")))]
+ #[cfg(feature = "v2020_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_8")))]
#[doc(alias = "ostree_repo_gpg_sign_data")]
pub fn gpg_sign_data(&self, data: &glib::Bytes, old_signatures: Option<&glib::Bytes>, key_id: &[&str], homedir: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Bytes, glib::Error> {
unsafe {
- let mut out_signatures = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_signatures = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_gpg_sign_data(self.to_glib_none().0, data.to_glib_none().0, old_signatures.to_glib_none().0, key_id.to_glib_none().0, homedir.to_glib_none().0, &mut out_signatures, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_signatures)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
#[doc(alias = "ostree_repo_gpg_verify_data")]
pub fn gpg_verify_data(&self, remote_name: Option<&str>, data: &glib::Bytes, signatures: &glib::Bytes, keyringdir: Option<&impl IsA<gio::File>>, extra_keyring: Option<&impl IsA<gio::File>>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<GpgVerifyResult, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_gpg_verify_data(self.to_glib_none().0, remote_name.to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, keyringdir.map(|p| p.as_ref()).to_glib_none().0, extra_keyring.map(|p| p.as_ref()).to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_repo_has_object")]
pub fn has_object(&self, objtype: ObjectType, checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
unsafe {
- let mut out_have_object = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_have_object = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_has_object(self.to_glib_none().0, objtype.into_glib(), checksum.to_glib_none().0, out_have_object.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_have_object.assume_init())) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_12", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_12")))]
+ #[cfg(feature = "v2017_12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_12")))]
#[doc(alias = "ostree_repo_hash")]
pub fn hash(&self) -> u32 {
unsafe {
#[doc(alias = "ostree_repo_import_object_from")]
pub fn import_object_from(&self, source: &Repo, objtype: ObjectType, checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_import_object_from(self.to_glib_none().0, source.to_glib_none().0, objtype.into_glib(), checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
#[doc(alias = "ostree_repo_import_object_from_with_trust")]
pub fn import_object_from_with_trust(&self, source: &Repo, objtype: ObjectType, checksum: &str, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_import_object_from_with_trust(self.to_glib_none().0, source.to_glib_none().0, objtype.into_glib(), checksum.to_glib_none().0, trusted.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_is_writable")]
pub fn is_writable(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_is_writable(self.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- //#[cfg(any(feature = "v2018_6", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ //#[cfg(feature = "v2018_6")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
//#[doc(alias = "ostree_repo_list_collection_refs")]
//pub fn list_collection_refs(&self, match_collection_id: Option<&str>, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_list_collection_refs() }
//}
//#[doc(alias = "ostree_repo_list_objects")]
- //pub fn list_objects(&self, flags: RepoListObjectsFlags, out_objects: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 204 }/TypeId { ns_id: 2, id: 204 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
+ //pub fn list_objects(&self, flags: RepoListObjectsFlags, out_objects: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 222 }/TypeId { ns_id: 2, id: 222 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_list_objects() }
//}
// unsafe { TODO: call ffi:ostree_repo_list_refs() }
//}
- //#[cfg(any(feature = "v2016_4", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ //#[cfg(feature = "v2016_4")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
//#[doc(alias = "ostree_repo_list_refs_ext")]
//pub fn list_refs_ext(&self, refspec_prefix: Option<&str>, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_list_refs_ext() }
//}
- #[cfg(any(feature = "v2020_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_8")))]
+ #[cfg(feature = "v2020_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_8")))]
#[doc(alias = "ostree_repo_list_static_delta_indexes")]
pub fn list_static_delta_indexes(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Vec<glib::GString>, glib::Error> {
unsafe {
- let mut out_indexes = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_indexes = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_list_static_delta_indexes(self.to_glib_none().0, &mut out_indexes, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_indexes)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_list_static_delta_names")]
pub fn list_static_delta_names(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Vec<glib::GString>, glib::Error> {
unsafe {
- let mut out_deltas = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_deltas = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_list_static_delta_names(self.to_glib_none().0, &mut out_deltas, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_deltas)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2015_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
+ #[cfg(feature = "v2015_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
#[doc(alias = "ostree_repo_load_commit")]
pub fn load_commit(&self, checksum: &str) -> Result<(glib::Variant, RepoCommitState), glib::Error> {
unsafe {
- let mut out_commit = ptr::null_mut();
- let mut out_state = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_commit = std::ptr::null_mut();
+ let mut out_state = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_load_commit(self.to_glib_none().0, checksum.to_glib_none().0, &mut out_commit, out_state.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_commit), from_glib(out_state.assume_init()))) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_load_object_stream")]
pub fn load_object_stream(&self, objtype: ObjectType, checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, u64), glib::Error> {
unsafe {
- let mut out_input = ptr::null_mut();
- let mut out_size = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_input = std::ptr::null_mut();
+ let mut out_size = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_load_object_stream(self.to_glib_none().0, objtype.into_glib(), checksum.to_glib_none().0, &mut out_input, out_size.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_input), out_size.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_load_variant")]
pub fn load_variant(&self, objtype: ObjectType, sha256: &str) -> Result<glib::Variant, glib::Error> {
unsafe {
- let mut out_variant = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_variant = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_load_variant(self.to_glib_none().0, objtype.into_glib(), sha256.to_glib_none().0, &mut out_variant, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_variant)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_load_variant_if_exists")]
pub fn load_variant_if_exists(&self, objtype: ObjectType, sha256: &str) -> Result<Option<glib::Variant>, glib::Error> {
unsafe {
- let mut out_variant = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_variant = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_load_variant_if_exists(self.to_glib_none().0, objtype.into_glib(), sha256.to_glib_none().0, &mut out_variant, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_variant)) } else { Err(from_glib_full(error)) }
}
}
- //#[cfg(any(feature = "v2021_3", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_3")))]
+ //#[cfg(feature = "v2021_3")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2021_3")))]
//#[doc(alias = "ostree_repo_lock_pop")]
//pub fn lock_pop(&self, lock_type: /*Ignored*/RepoLockType, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_lock_pop() }
//}
- //#[cfg(any(feature = "v2021_3", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_3")))]
+ //#[cfg(feature = "v2021_3")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2021_3")))]
//#[doc(alias = "ostree_repo_lock_push")]
//pub fn lock_push(&self, lock_type: /*Ignored*/RepoLockType, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_lock_push() }
//}
- #[cfg(any(feature = "v2017_15", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
+ #[cfg(feature = "v2017_15")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
#[doc(alias = "ostree_repo_mark_commit_partial")]
pub fn mark_commit_partial(&self, checksum: &str, is_partial: bool) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_mark_commit_partial(self.to_glib_none().0, checksum.to_glib_none().0, is_partial.into_glib(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2019_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_4")))]
+ #[cfg(feature = "v2019_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_4")))]
#[doc(alias = "ostree_repo_mark_commit_partial_reason")]
pub fn mark_commit_partial_reason(&self, checksum: &str, is_partial: bool, in_state: RepoCommitState) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_mark_commit_partial_reason(self.to_glib_none().0, checksum.to_glib_none().0, is_partial.into_glib(), in_state.into_glib(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_open")]
pub fn open(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_open(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_prepare_transaction")]
pub fn prepare_transaction(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
unsafe {
- let mut out_transaction_resume = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_transaction_resume = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_prepare_transaction(self.to_glib_none().0, out_transaction_resume.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_transaction_resume.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_prune")]
pub fn prune(&self, flags: RepoPruneFlags, depth: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(i32, i32, u64), glib::Error> {
unsafe {
- let mut out_objects_total = mem::MaybeUninit::uninit();
- let mut out_objects_pruned = mem::MaybeUninit::uninit();
- let mut out_pruned_object_size_total = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_objects_total = std::mem::MaybeUninit::uninit();
+ let mut out_objects_pruned = std::mem::MaybeUninit::uninit();
+ let mut out_pruned_object_size_total = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_prune(self.to_glib_none().0, flags.into_glib(), depth, out_objects_total.as_mut_ptr(), out_objects_pruned.as_mut_ptr(), out_pruned_object_size_total.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((out_objects_total.assume_init(), out_objects_pruned.assume_init(), out_pruned_object_size_total.assume_init())) } else { Err(from_glib_full(error)) }
}
}
- //#[cfg(any(feature = "v2017_1", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_1")))]
+ //#[cfg(feature = "v2017_1")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2017_1")))]
//#[doc(alias = "ostree_repo_prune_from_reachable")]
//pub fn prune_from_reachable(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(i32, i32, u64), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_prune_from_reachable() }
#[doc(alias = "ostree_repo_prune_static_deltas")]
pub fn prune_static_deltas(&self, commit: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_prune_static_deltas(self.to_glib_none().0, commit.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_pull")]
pub fn pull(&self, remote_name: &str, refs_to_fetch: &[&str], flags: RepoPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_pull(self.to_glib_none().0, remote_name.to_glib_none().0, refs_to_fetch.to_glib_none().0, flags.into_glib(), progress.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_pull_one_dir")]
pub fn pull_one_dir(&self, remote_name: &str, dir_to_pull: &str, refs_to_fetch: &[&str], flags: RepoPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_pull_one_dir(self.to_glib_none().0, remote_name.to_glib_none().0, dir_to_pull.to_glib_none().0, refs_to_fetch.to_glib_none().0, flags.into_glib(), progress.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_pull_with_options")]
pub fn pull_with_options(&self, remote_name_or_baseurl: &str, options: &glib::Variant, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_pull_with_options(self.to_glib_none().0, remote_name_or_baseurl.to_glib_none().0, options.to_glib_none().0, progress.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_query_object_storage_size")]
pub fn query_object_storage_size(&self, objtype: ObjectType, sha256: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<u64, glib::Error> {
unsafe {
- let mut out_size = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_size = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_query_object_storage_size(self.to_glib_none().0, objtype.into_glib(), sha256.to_glib_none().0, out_size.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(out_size.assume_init()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_read_commit")]
pub fn read_commit(&self, ref_: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::File, glib::GString), glib::Error> {
unsafe {
- let mut out_root = ptr::null_mut();
- let mut out_commit = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_root = std::ptr::null_mut();
+ let mut out_commit = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_read_commit(self.to_glib_none().0, ref_.to_glib_none().0, &mut out_root, &mut out_commit, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_root), from_glib_full(out_commit))) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_read_commit_detached_metadata")]
pub fn read_commit_detached_metadata(&self, checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::Variant>, glib::Error> {
unsafe {
- let mut out_metadata = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_metadata = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_read_commit_detached_metadata(self.to_glib_none().0, checksum.to_glib_none().0, &mut out_metadata, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_metadata)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2023_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2023_1")))]
+ #[cfg(feature = "v2023_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_1")))]
#[doc(alias = "ostree_repo_regenerate_metadata")]
pub fn regenerate_metadata(&self, additional_metadata: Option<&glib::Variant>, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_regenerate_metadata(self.to_glib_none().0, additional_metadata.to_glib_none().0, options.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_regenerate_summary")]
pub fn regenerate_summary(&self, additional_metadata: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_regenerate_summary(self.to_glib_none().0, additional_metadata.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_2")))]
+ #[cfg(feature = "v2017_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_2")))]
#[doc(alias = "ostree_repo_reload_config")]
pub fn reload_config(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_reload_config(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_add")]
pub fn remote_add(&self, name: &str, url: Option<&str>, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_add(self.to_glib_none().0, name.to_glib_none().0, url.to_glib_none().0, options.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_change")]
pub fn remote_change(&self, sysroot: Option<&impl IsA<gio::File>>, changeop: RepoRemoteChange, name: &str, url: Option<&str>, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_change(self.to_glib_none().0, sysroot.map(|p| p.as_ref()).to_glib_none().0, changeop.into_glib(), name.to_glib_none().0, url.to_glib_none().0, options.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_delete")]
pub fn remote_delete(&self, name: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_delete(self.to_glib_none().0, name.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_fetch_summary")]
pub fn remote_fetch_summary(&self, name: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(glib::Bytes, glib::Bytes), glib::Error> {
unsafe {
- let mut out_summary = ptr::null_mut();
- let mut out_signatures = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_summary = std::ptr::null_mut();
+ let mut out_signatures = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_fetch_summary(self.to_glib_none().0, name.to_glib_none().0, &mut out_summary, &mut out_signatures, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_summary), from_glib_full(out_signatures))) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
#[doc(alias = "ostree_repo_remote_fetch_summary_with_options")]
pub fn remote_fetch_summary_with_options(&self, name: &str, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(glib::Bytes, glib::Bytes), glib::Error> {
unsafe {
- let mut out_summary = ptr::null_mut();
- let mut out_signatures = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_summary = std::ptr::null_mut();
+ let mut out_signatures = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_fetch_summary_with_options(self.to_glib_none().0, name.to_glib_none().0, options.to_glib_none().0, &mut out_summary, &mut out_signatures, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok((from_glib_full(out_summary), from_glib_full(out_signatures))) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2021_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+ #[cfg(feature = "v2021_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
#[doc(alias = "ostree_repo_remote_get_gpg_keys")]
pub fn remote_get_gpg_keys(&self, name: Option<&str>, key_ids: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Vec<glib::Variant>, glib::Error> {
unsafe {
- let mut out_keys = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_keys = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_get_gpg_keys(self.to_glib_none().0, name.to_glib_none().0, key_ids.to_glib_none().0, &mut out_keys, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_keys)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_get_gpg_verify")]
pub fn remote_get_gpg_verify(&self, name: &str) -> Result<bool, glib::Error> {
unsafe {
- let mut out_gpg_verify = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_gpg_verify = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_get_gpg_verify(self.to_glib_none().0, name.to_glib_none().0, out_gpg_verify.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_gpg_verify.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_get_gpg_verify_summary")]
pub fn remote_get_gpg_verify_summary(&self, name: &str) -> Result<bool, glib::Error> {
unsafe {
- let mut out_gpg_verify_summary = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_gpg_verify_summary = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_get_gpg_verify_summary(self.to_glib_none().0, name.to_glib_none().0, out_gpg_verify_summary.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_gpg_verify_summary.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_get_url")]
pub fn remote_get_url(&self, name: &str) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut out_url = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_url = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_get_url(self.to_glib_none().0, name.to_glib_none().0, &mut out_url, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_url)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_gpg_import")]
pub fn remote_gpg_import(&self, name: &str, source_stream: Option<&impl IsA<gio::InputStream>>, key_ids: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<u32, glib::Error> {
unsafe {
- let mut out_imported = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_imported = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_remote_gpg_import(self.to_glib_none().0, name.to_glib_none().0, source_stream.map(|p| p.as_ref()).to_glib_none().0, key_ids.to_glib_none().0, out_imported.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(out_imported.assume_init()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_remote_list")]
pub fn remote_list(&self) -> Vec<glib::GString> {
unsafe {
- let mut out_n_remotes = mem::MaybeUninit::uninit();
+ let mut out_n_remotes = std::mem::MaybeUninit::uninit();
let ret = FromGlibContainer::from_glib_full_num(ffi::ostree_repo_remote_list(self.to_glib_none().0, out_n_remotes.as_mut_ptr()), out_n_remotes.assume_init() as _);
ret
}
}
- //#[cfg(any(feature = "v2018_6", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ //#[cfg(feature = "v2018_6")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
//#[doc(alias = "ostree_repo_remote_list_collection_refs")]
//pub fn remote_list_collection_refs(&self, remote_name: &str, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_remote_list_collection_refs() }
// unsafe { TODO: call ffi:ostree_repo_remote_list_refs() }
//}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_resolve_collection_ref")]
pub fn resolve_collection_ref(&self, ref_: &CollectionRef, allow_noent: bool, flags: RepoResolveRevExtFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_rev = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_rev = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_resolve_collection_ref(self.to_glib_none().0, ref_.to_glib_none().0, allow_noent.into_glib(), flags.into_glib(), &mut out_rev, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_rev)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_resolve_keyring_for_collection")]
pub fn resolve_keyring_for_collection(&self, collection_id: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Remote, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_resolve_keyring_for_collection(self.to_glib_none().0, collection_id.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_repo_resolve_rev")]
pub fn resolve_rev(&self, refspec: &str, allow_noent: bool) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_rev = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_rev = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_resolve_rev(self.to_glib_none().0, refspec.to_glib_none().0, allow_noent.into_glib(), &mut out_rev, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_rev)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_7")))]
+ #[cfg(feature = "v2016_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_7")))]
#[doc(alias = "ostree_repo_resolve_rev_ext")]
pub fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_rev = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_rev = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_resolve_rev_ext(self.to_glib_none().0, refspec.to_glib_none().0, allow_noent.into_glib(), flags.into_glib(), &mut out_rev, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_rev)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_scan_hardlinks")]
pub fn scan_hardlinks(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_scan_hardlinks(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
#[doc(alias = "ostree_repo_set_alias_ref_immediate")]
pub fn set_alias_ref_immediate(&self, remote: Option<&str>, ref_: &str, target: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_set_alias_ref_immediate(self.to_glib_none().0, remote.to_glib_none().0, ref_.to_glib_none().0, target.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
#[doc(alias = "ostree_repo_set_cache_dir")]
pub fn set_cache_dir(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_set_cache_dir(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_set_collection_id")]
pub fn set_collection_id(&self, collection_id: Option<&str>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_set_collection_id(self.to_glib_none().0, collection_id.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_set_collection_ref_immediate")]
pub fn set_collection_ref_immediate(&self, ref_: &CollectionRef, checksum: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_set_collection_ref_immediate(self.to_glib_none().0, ref_.to_glib_none().0, checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_set_ref_immediate")]
pub fn set_ref_immediate(&self, remote: Option<&str>, ref_: &str, checksum: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_set_ref_immediate(self.to_glib_none().0, remote.to_glib_none().0, ref_.to_glib_none().0, checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_sign_commit")]
pub fn sign_commit(&self, commit_checksum: &str, key_id: &str, homedir: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_sign_commit(self.to_glib_none().0, commit_checksum.to_glib_none().0, key_id.to_glib_none().0, homedir.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_sign_delta")]
pub fn sign_delta(&self, from_commit: &str, to_commit: &str, key_id: &str, homedir: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_sign_delta(self.to_glib_none().0, from_commit.to_glib_none().0, to_commit.to_glib_none().0, key_id.to_glib_none().0, homedir.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2021_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+ #[cfg(feature = "v2021_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
#[doc(alias = "ostree_repo_signature_verify_commit_data")]
pub fn signature_verify_commit_data(&self, remote_name: &str, commit_data: &glib::Bytes, commit_metadata: &glib::Bytes, flags: RepoVerifyFlags) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut out_results = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_results = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_signature_verify_commit_data(self.to_glib_none().0, remote_name.to_glib_none().0, commit_data.to_glib_none().0, commit_metadata.to_glib_none().0, flags.into_glib(), &mut out_results, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_results)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_static_delta_execute_offline")]
pub fn static_delta_execute_offline(&self, dir_or_file: &impl IsA<gio::File>, skip_validation: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_static_delta_execute_offline(self.to_glib_none().0, dir_or_file.as_ref().to_glib_none().0, skip_validation.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_repo_static_delta_execute_offline_with_signature")]
pub fn static_delta_execute_offline_with_signature(&self, dir_or_file: &impl IsA<gio::File>, sign: &impl IsA<Sign>, skip_validation: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_static_delta_execute_offline_with_signature(self.to_glib_none().0, dir_or_file.as_ref().to_glib_none().0, sign.as_ref().to_glib_none().0, skip_validation.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_static_delta_generate")]
pub fn static_delta_generate(&self, opt: StaticDeltaGenerateOpt, from: Option<&str>, to: &str, metadata: Option<&glib::Variant>, params: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_static_delta_generate(self.to_glib_none().0, opt.into_glib(), from.to_glib_none().0, to.to_glib_none().0, metadata.to_glib_none().0, params.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- //#[cfg(any(feature = "v2020_8", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_8")))]
+ //#[cfg(feature = "v2020_8")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2020_8")))]
//#[doc(alias = "ostree_repo_static_delta_reindex")]
//pub fn static_delta_reindex(&self, flags: /*Ignored*/StaticDeltaIndexFlags, opt_to_commit: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_static_delta_reindex() }
//}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_repo_static_delta_verify_signature")]
pub fn static_delta_verify_signature(&self, delta_id: &str, sign: &impl IsA<Sign>) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_success_message = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_success_message = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_static_delta_verify_signature(self.to_glib_none().0, delta_id.to_glib_none().0, sign.as_ref().to_glib_none().0, &mut out_success_message, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_transaction_set_collection_ref")]
pub fn transaction_set_collection_ref(&self, ref_: &CollectionRef, checksum: Option<&str>) {
unsafe {
}
//#[doc(alias = "ostree_repo_traverse_commit")]
- //pub fn traverse_commit(&self, commit_checksum: &str, maxdepth: i32, out_reachable: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 204 }/TypeId { ns_id: 2, id: 204 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
+ //pub fn traverse_commit(&self, commit_checksum: &str, maxdepth: i32, out_reachable: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 222 }/TypeId { ns_id: 2, id: 222 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_traverse_commit() }
//}
// unsafe { TODO: call ffi:ostree_repo_traverse_commit_union() }
//}
- //#[cfg(any(feature = "v2018_5", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ //#[cfg(feature = "v2018_5")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
//#[doc(alias = "ostree_repo_traverse_commit_union_with_parents")]
//pub fn traverse_commit_union_with_parents(&self, commit_checksum: &str, maxdepth: i32, inout_reachable: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, inout_parents: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_traverse_commit_union_with_parents() }
//}
- //#[cfg(any(feature = "v2018_5", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ //#[cfg(feature = "v2018_5")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
//#[doc(alias = "ostree_repo_traverse_commit_with_flags")]
//pub fn traverse_commit_with_flags(&self, flags: RepoCommitTraverseFlags, commit_checksum: &str, maxdepth: i32, inout_reachable: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, inout_parents: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_traverse_commit_with_flags() }
//}
- //#[cfg(any(feature = "v2018_6", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ //#[cfg(feature = "v2018_6")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
//#[doc(alias = "ostree_repo_traverse_reachable_refs")]
- //pub fn traverse_reachable_refs(&self, depth: u32, reachable: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 204 }/TypeId { ns_id: 2, id: 204 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
+ //pub fn traverse_reachable_refs(&self, depth: u32, reachable: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 222 }/TypeId { ns_id: 2, id: 222 }, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:ostree_repo_traverse_reachable_refs() }
//}
#[doc(alias = "ostree_repo_verify_commit")]
pub fn verify_commit(&self, commit_checksum: &str, keyringdir: Option<&impl IsA<gio::File>>, extra_keyring: Option<&impl IsA<gio::File>>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_verify_commit(self.to_glib_none().0, commit_checksum.to_glib_none().0, keyringdir.map(|p| p.as_ref()).to_glib_none().0, extra_keyring.map(|p| p.as_ref()).to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_verify_commit_ext")]
pub fn verify_commit_ext(&self, commit_checksum: &str, keyringdir: Option<&impl IsA<gio::File>>, extra_keyring: Option<&impl IsA<gio::File>>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<GpgVerifyResult, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_verify_commit_ext(self.to_glib_none().0, commit_checksum.to_glib_none().0, keyringdir.map(|p| p.as_ref()).to_glib_none().0, extra_keyring.map(|p| p.as_ref()).to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_14", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_14")))]
+ #[cfg(feature = "v2016_14")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_14")))]
#[doc(alias = "ostree_repo_verify_commit_for_remote")]
pub fn verify_commit_for_remote(&self, commit_checksum: &str, remote_name: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<GpgVerifyResult, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_verify_commit_for_remote(self.to_glib_none().0, commit_checksum.to_glib_none().0, remote_name.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_repo_verify_summary")]
pub fn verify_summary(&self, remote_name: &str, summary: &glib::Bytes, signatures: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<GpgVerifyResult, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_verify_summary(self.to_glib_none().0, remote_name.to_glib_none().0, summary.to_glib_none().0, signatures.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_repo_write_archive_to_mtree")]
pub fn write_archive_to_mtree(&self, archive: &impl IsA<gio::File>, mtree: &MutableTree, modifier: Option<&RepoCommitModifier>, autocreate_parents: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_archive_to_mtree(self.to_glib_none().0, archive.as_ref().to_glib_none().0, mtree.to_glib_none().0, modifier.to_glib_none().0, autocreate_parents.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_archive_to_mtree_from_fd")]
pub fn write_archive_to_mtree_from_fd(&self, fd: i32, mtree: &MutableTree, modifier: Option<&RepoCommitModifier>, autocreate_parents: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_archive_to_mtree_from_fd(self.to_glib_none().0, fd, mtree.to_glib_none().0, modifier.to_glib_none().0, autocreate_parents.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_commit")]
pub fn write_commit(&self, parent: Option<&str>, subject: Option<&str>, body: Option<&str>, metadata: Option<&glib::Variant>, root: &RepoFile, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut out_commit = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_commit = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_commit(self.to_glib_none().0, parent.to_glib_none().0, subject.to_glib_none().0, body.to_glib_none().0, metadata.to_glib_none().0, root.to_glib_none().0, &mut out_commit, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_commit)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_commit_detached_metadata")]
pub fn write_commit_detached_metadata(&self, checksum: &str, metadata: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_commit_detached_metadata(self.to_glib_none().0, checksum.to_glib_none().0, metadata.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_commit_with_time")]
pub fn write_commit_with_time(&self, parent: Option<&str>, subject: Option<&str>, body: Option<&str>, metadata: Option<&glib::Variant>, root: &RepoFile, time: u64, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut out_commit = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_commit = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_commit_with_time(self.to_glib_none().0, parent.to_glib_none().0, subject.to_glib_none().0, body.to_glib_none().0, metadata.to_glib_none().0, root.to_glib_none().0, time, &mut out_commit, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_commit)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_config")]
pub fn write_config(&self, new_config: &glib::KeyFile) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_config(self.to_glib_none().0, new_config.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_content_trusted")]
pub fn write_content_trusted(&self, checksum: &str, object_input: &impl IsA<gio::InputStream>, length: u64, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_content_trusted(self.to_glib_none().0, checksum.to_glib_none().0, object_input.as_ref().to_glib_none().0, length, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_dfd_to_mtree")]
pub fn write_dfd_to_mtree(&self, dfd: i32, path: &str, mtree: &MutableTree, modifier: Option<&RepoCommitModifier>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_dfd_to_mtree(self.to_glib_none().0, dfd, path.to_glib_none().0, mtree.to_glib_none().0, modifier.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_directory_to_mtree")]
pub fn write_directory_to_mtree(&self, dir: &impl IsA<gio::File>, mtree: &MutableTree, modifier: Option<&RepoCommitModifier>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_directory_to_mtree(self.to_glib_none().0, dir.as_ref().to_glib_none().0, mtree.to_glib_none().0, modifier.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_metadata_stream_trusted")]
pub fn write_metadata_stream_trusted(&self, objtype: ObjectType, checksum: &str, object_input: &impl IsA<gio::InputStream>, length: u64, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_metadata_stream_trusted(self.to_glib_none().0, objtype.into_glib(), checksum.to_glib_none().0, object_input.as_ref().to_glib_none().0, length, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_metadata_trusted")]
pub fn write_metadata_trusted(&self, objtype: ObjectType, checksum: &str, variant: &glib::Variant, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_metadata_trusted(self.to_glib_none().0, objtype.into_glib(), checksum.to_glib_none().0, variant.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_write_mtree")]
pub fn write_mtree(&self, mtree: &MutableTree, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::File, glib::Error> {
unsafe {
- let mut out_file = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_file = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_write_mtree(self.to_glib_none().0, mtree.to_glib_none().0, &mut out_file, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_file)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2021_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
+ #[cfg(feature = "v2021_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
#[doc(alias = "ostree_repo_write_regfile")]
pub fn write_regfile(&self, expected_checksum: Option<&str>, uid: u32, gid: u32, mode: u32, content_len: u64, xattrs: Option<&glib::Variant>) -> Result<ContentWriter, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_write_regfile(self.to_glib_none().0, expected_checksum.to_glib_none().0, uid, gid, mode, content_len, xattrs.to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2021_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
+ #[cfg(feature = "v2021_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
#[doc(alias = "ostree_repo_write_regfile_inline")]
pub fn write_regfile_inline(&self, expected_checksum: Option<&str>, uid: u32, gid: u32, mode: u32, xattrs: Option<&glib::Variant>, buf: &[u8], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
let len = buf.len() as _;
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_write_regfile_inline(self.to_glib_none().0, expected_checksum.to_glib_none().0, uid, gid, mode, xattrs.to_glib_none().0, buf.to_glib_none().0, len, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2021_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
+ #[cfg(feature = "v2021_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
#[doc(alias = "ostree_repo_write_symlink")]
pub fn write_symlink(&self, expected_checksum: Option<&str>, uid: u32, gid: u32, xattrs: Option<&glib::Variant>, symlink_target: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_write_symlink(self.to_glib_none().0, expected_checksum.to_glib_none().0, uid, gid, xattrs.to_glib_none().0, symlink_target.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "remotes-config-dir")]
pub fn remotes_config_dir(&self) -> Option<glib::GString> {
- glib::ObjectExt::property(self, "remotes-config-dir")
+ ObjectExt::property(self, "remotes-config-dir")
}
#[doc(alias = "sysroot-path")]
pub fn sysroot_path(&self) -> Option<gio::File> {
- glib::ObjectExt::property(self, "sysroot-path")
+ ObjectExt::property(self, "sysroot-path")
}
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
#[doc(alias = "ostree_repo_create_at")]
pub fn create_at(dfd: i32, path: &str, mode: RepoMode, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Repo, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_create_at(dfd, path.to_glib_none().0, mode.into_glib(), options.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_repo_mode_from_string")]
pub fn mode_from_string(mode: &str) -> Result<RepoMode, glib::Error> {
unsafe {
- let mut out_mode = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_mode = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_mode_from_string(mode.to_glib_none().0, out_mode.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_mode.assume_init())) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
#[doc(alias = "ostree_repo_open_at")]
pub fn open_at(dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Repo, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_repo_open_at(dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
// unsafe { TODO: call ffi:ostree_repo_pull_default_console_progress_changed() }
//}
- //#[cfg(any(feature = "v2018_5", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ //#[cfg(feature = "v2018_5")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
//#[doc(alias = "ostree_repo_traverse_new_parents")]
- //pub fn traverse_new_parents() -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 204 }/TypeId { ns_id: 2, id: 204 } {
+ //pub fn traverse_new_parents() -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 222 }/TypeId { ns_id: 2, id: 222 } {
// unsafe { TODO: call ffi:ostree_repo_traverse_new_parents() }
//}
//#[doc(alias = "ostree_repo_traverse_new_reachable")]
- //pub fn traverse_new_reachable() -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 204 }/TypeId { ns_id: 2, id: 204 } {
+ //pub fn traverse_new_reachable() -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 222 }/TypeId { ns_id: 2, id: 222 } {
// unsafe { TODO: call ffi:ostree_repo_traverse_new_reachable() }
//}
- //#[cfg(any(feature = "v2018_5", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ //#[cfg(feature = "v2018_5")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
//#[doc(alias = "ostree_repo_traverse_parents_get_commits")]
//pub fn traverse_parents_get_commits(parents: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, object: &glib::Variant) -> Vec<glib::GString> {
// unsafe { TODO: call ffi:ostree_repo_traverse_parents_get_commits() }
#[doc(alias = "gpg-verify-result")]
pub fn connect_gpg_verify_result<F: Fn(&Self, &str, &GpgVerifyResult) + Send + 'static>(&self, f: F) -> SignalHandlerId {
- unsafe extern "C" fn gpg_verify_result_trampoline<F: Fn(&Repo, &str, &GpgVerifyResult) + Send + 'static>(this: *mut ffi::OstreeRepo, checksum: *mut libc::c_char, result: *mut ffi::OstreeGpgVerifyResult, f: glib::ffi::gpointer) {
+ unsafe extern "C" fn gpg_verify_result_trampoline<F: Fn(&Repo, &str, &GpgVerifyResult) + Send + 'static>(this: *mut ffi::OstreeRepo, checksum: *mut std::ffi::c_char, result: *mut ffi::OstreeGpgVerifyResult, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), &glib::GString::from_glib_borrow(checksum), &from_glib_borrow(result))
}
unsafe {
let f: Box_<F> = Box_::new(f);
- connect_raw(self.as_ptr() as *mut _, b"gpg-verify-result\0".as_ptr() as *const _,
- Some(transmute::<_, unsafe extern "C" fn()>(gpg_verify_result_trampoline::<F> as *const ())), Box_::into_raw(f))
+ connect_raw(self.as_ptr() as *mut _, c"gpg-verify-result".as_ptr() as *const _,
+ Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(gpg_verify_result_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
}
unsafe impl Send for Repo {}
-
-impl fmt::Display for Repo {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("Repo")
- }
-}
// from gir-files
// DO NOT EDIT
-use crate::Repo;
-use crate::RepoCommitFilterResult;
-use crate::RepoCommitModifierFlags;
-#[cfg(any(feature = "v2017_13", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
-use crate::RepoDevInoCache;
-use crate::SePolicy;
-#[cfg(any(feature = "v2020_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
-use glib::object::IsA;
-use glib::translate::*;
-use std::boxed::Box as Box_;
-#[cfg(any(feature = "v2020_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
-use std::ptr;
+use crate::{ffi,Repo,RepoCommitFilterResult,RepoCommitModifierFlags,SePolicy};
+#[cfg(feature = "v2017_13")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
+use crate::{RepoDevInoCache};
+use glib::{translate::*};
+#[cfg(feature = "v2020_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
+use glib::{prelude::*};
+use std::{boxed::Box as Box_};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc(alias = "ostree_repo_commit_modifier_new")]
pub fn new(flags: RepoCommitModifierFlags, commit_filter: Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>) -> RepoCommitModifier {
let commit_filter_data: Box_<Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>> = Box_::new(commit_filter);
- unsafe extern "C" fn commit_filter_func(repo: *mut ffi::OstreeRepo, path: *const libc::c_char, file_info: *mut gio::ffi::GFileInfo, user_data: glib::ffi::gpointer) -> ffi::OstreeRepoCommitFilterResult {
+ unsafe extern "C" fn commit_filter_func(repo: *mut ffi::OstreeRepo, path: *const std::ffi::c_char, file_info: *mut gio::ffi::GFileInfo, user_data: glib::ffi::gpointer) -> ffi::OstreeRepoCommitFilterResult {
let repo = from_glib_borrow(repo);
let path: Borrowed<glib::GString> = from_glib_borrow(path);
let file_info = from_glib_borrow(file_info);
- let callback: &Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>> = &*(user_data as *mut _);
- let res = if let Some(ref callback) = *callback {
+ let callback = &*(user_data as *mut Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>);
+ if let Some(ref callback) = *callback {
callback(&repo, path.as_str(), &file_info)
} else {
panic!("cannot get closure...")
- };
- res.into_glib()
+ }
+ .into_glib()
}
let commit_filter = if commit_filter_data.is_some() { Some(commit_filter_func as _) } else { None };
unsafe extern "C" fn destroy_notify_func(data: glib::ffi::gpointer) {
- let _callback: Box_<Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>> = Box_::from_raw(data as *mut _);
+ let _callback = Box_::from_raw(data as *mut Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>);
}
let destroy_call3 = Some(destroy_notify_func as _);
let super_callback0: Box_<Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>> = commit_filter_data;
}
}
- #[cfg(any(feature = "v2017_13", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+ #[cfg(feature = "v2017_13")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
#[doc(alias = "ostree_repo_commit_modifier_set_devino_cache")]
pub fn set_devino_cache(&self, cache: &RepoDevInoCache) {
unsafe {
}
}
- #[cfg(any(feature = "v2020_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
+ #[cfg(feature = "v2020_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
#[doc(alias = "ostree_repo_commit_modifier_set_sepolicy_from_commit")]
pub fn set_sepolicy_from_commit(&self, repo: &Repo, rev: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_commit_modifier_set_sepolicy_from_commit(self.to_glib_none().0, repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_commit_modifier_set_xattr_callback")]
pub fn set_xattr_callback<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(&self, callback: P) {
let callback_data: Box_<P> = Box_::new(callback);
- unsafe extern "C" fn callback_func<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(repo: *mut ffi::OstreeRepo, path: *const libc::c_char, file_info: *mut gio::ffi::GFileInfo, user_data: glib::ffi::gpointer) -> *mut glib::ffi::GVariant {
+ unsafe extern "C" fn callback_func<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(repo: *mut ffi::OstreeRepo, path: *const std::ffi::c_char, file_info: *mut gio::ffi::GFileInfo, user_data: glib::ffi::gpointer) -> *mut glib::ffi::GVariant {
let repo = from_glib_borrow(repo);
let path: Borrowed<glib::GString> = from_glib_borrow(path);
let file_info = from_glib_borrow(file_info);
- let callback: &P = &*(user_data as *mut _);
- let res = (*callback)(&repo, path.as_str(), &file_info);
- res.to_glib_full()
+ let callback = &*(user_data as *mut P);
+ (*callback)(&repo, path.as_str(), &file_info)
+ .to_glib_full()
}
let callback = Some(callback_func::<P> as _);
unsafe extern "C" fn destroy_func<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(data: glib::ffi::gpointer) {
- let _callback: Box_<P> = Box_::from_raw(data as *mut _);
+ let _callback = Box_::from_raw(data as *mut P);
}
let destroy_call2 = Some(destroy_func::<P> as _);
let super_callback0: Box_<P> = callback_data;
// from gir-files
// DO NOT EDIT
-use glib::translate::*;
+use crate::{ffi};
+use glib::{translate::*};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
// from gir-files
// DO NOT EDIT
-use crate::Repo;
-use glib::object::IsA;
-use glib::translate::*;
-use std::fmt;
-use std::mem;
-use std::ptr;
+use crate::{ffi,Repo};
+use glib::{prelude::*,translate::*};
glib::wrapper! {
#[doc(alias = "OstreeRepoFile")]
#[doc(alias = "ostree_repo_file_ensure_resolved")]
pub fn ensure_resolved(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_file_ensure_resolved(self.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "get_xattrs")]
pub fn xattrs(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
unsafe {
- let mut out_xattrs = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_xattrs = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_file_get_xattrs(self.to_glib_none().0, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_xattrs)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_repo_file_tree_find_child")]
pub fn tree_find_child(&self, name: &str) -> (i32, bool, glib::Variant) {
unsafe {
- let mut is_dir = mem::MaybeUninit::uninit();
- let mut out_container = ptr::null_mut();
+ let mut is_dir = std::mem::MaybeUninit::uninit();
+ let mut out_container = std::ptr::null_mut();
let ret = ffi::ostree_repo_file_tree_find_child(self.to_glib_none().0, name.to_glib_none().0, is_dir.as_mut_ptr(), &mut out_container);
(ret, from_glib(is_dir.assume_init()), from_glib_full(out_container))
}
#[doc(alias = "ostree_repo_file_tree_query_child")]
pub fn tree_query_child(&self, n: i32, attributes: &str, flags: gio::FileQueryInfoFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::FileInfo, glib::Error> {
unsafe {
- let mut out_info = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_info = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_repo_file_tree_query_child(self.to_glib_none().0, n, attributes.to_glib_none().0, flags.into_glib(), &mut out_info, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_info)) } else { Err(from_glib_full(error)) }
}
}
}
}
}
-
-impl fmt::Display for RepoFile {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("RepoFile")
- }
-}
// from gir-files
// DO NOT EDIT
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use crate::RepoFinderResult;
-use glib::object::IsA;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::translate::*;
-use std::fmt;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use std::ptr;
+use crate::{ffi};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use crate::{RepoFinderResult};
+use glib::{prelude::*};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeRepoFinder")]
}
-pub trait RepoFinderExt: 'static {}
+pub trait RepoFinderExt: IsA<RepoFinder> + 'static {}
impl<O: IsA<RepoFinder>> RepoFinderExt for O {}
-
-impl fmt::Display for RepoFinder {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("RepoFinder")
- }
-}
// from gir-files
// DO NOT EDIT
-use crate::RepoFinder;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::translate::*;
-use std::fmt;
+use crate::{ffi,RepoFinder};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeRepoFinderAvahi")]
}
impl RepoFinderAvahi {
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_finder_avahi_new")]
pub fn new(context: Option<&glib::MainContext>) -> RepoFinderAvahi {
unsafe {
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_finder_avahi_stop")]
pub fn stop(&self) {
unsafe {
}
}
}
-
-impl fmt::Display for RepoFinderAvahi {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("RepoFinderAvahi")
- }
-}
// from gir-files
// DO NOT EDIT
-use crate::RepoFinder;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::translate::*;
-use std::fmt;
+use crate::{ffi,RepoFinder};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeRepoFinderConfig")]
}
impl RepoFinderConfig {
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_finder_config_new")]
pub fn new() -> RepoFinderConfig {
unsafe {
}
}
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
impl Default for RepoFinderConfig {
fn default() -> Self {
Self::new()
}
}
-
-impl fmt::Display for RepoFinderConfig {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("RepoFinderConfig")
- }
-}
// from gir-files
// DO NOT EDIT
-use crate::RepoFinder;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::object::IsA;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::object::ObjectType as ObjectType_;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::translate::*;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::StaticType;
-use std::fmt;
+use crate::{ffi,RepoFinder};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use glib::{prelude::*,translate::*};
glib::wrapper! {
#[doc(alias = "OstreeRepoFinderMount")]
}
impl RepoFinderMount {
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_finder_mount_new")]
pub fn new(monitor: Option<&impl IsA<gio::VolumeMonitor>>) -> RepoFinderMount {
unsafe {
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn monitor(&self) -> Option<gio::VolumeMonitor> {
- glib::ObjectExt::property(self, "monitor")
- }
-}
-
-impl fmt::Display for RepoFinderMount {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("RepoFinderMount")
+ ObjectExt::property(self, "monitor")
}
}
// from gir-files
// DO NOT EDIT
-use crate::RepoFinder;
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
-use glib::translate::*;
-use std::fmt;
+use crate::{ffi,RepoFinder};
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeRepoFinderOverride")]
}
impl RepoFinderOverride {
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_finder_override_new")]
pub fn new() -> RepoFinderOverride {
unsafe {
}
}
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
#[doc(alias = "ostree_repo_finder_override_add_uri")]
pub fn add_uri(&self, uri: &str) {
unsafe {
}
}
-#[cfg(any(feature = "v2018_6", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+#[cfg(feature = "v2018_6")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
impl Default for RepoFinderOverride {
fn default() -> Self {
Self::new()
}
}
-
-impl fmt::Display for RepoFinderOverride {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("RepoFinderOverride")
- }
-}
// from gir-files
// DO NOT EDIT
-use glib::translate::*;
-use std::cmp;
+use crate::{ffi};
+use glib::{translate::*};
glib::wrapper! {
#[derive(Debug, Hash)]
impl PartialOrd for RepoFinderResult {
#[inline]
- fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
- self.compare(other).partial_cmp(&0)
+ fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
+ Some(self.cmp(other))
}
}
impl Ord for RepoFinderResult {
#[inline]
- fn cmp(&self, other: &Self) -> cmp::Ordering {
+ fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.compare(other).cmp(&0)
}
}
// from gir-files
// DO NOT EDIT
-use crate::Repo;
-use crate::SePolicyRestoreconFlags;
-use glib::object::IsA;
-use glib::object::ObjectType as ObjectType_;
-use glib::translate::*;
-use glib::StaticType;
-use std::fmt;
-use std::ptr;
+use crate::{ffi,Repo,SePolicyRestoreconFlags};
+use glib::{prelude::*,translate::*};
glib::wrapper! {
#[doc(alias = "OstreeSePolicy")]
#[doc(alias = "ostree_sepolicy_new")]
pub fn new(path: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sepolicy_new(path.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+ #[cfg(feature = "v2017_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
#[doc(alias = "ostree_sepolicy_new_at")]
pub fn new_at(rootfs_dfd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sepolicy_new_at(rootfs_dfd, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "new_from_commit")]
pub fn from_commit(repo: &Repo, rev: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sepolicy_new_from_commit(repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
#[doc(alias = "ostree_sepolicy_get_csum")]
#[doc(alias = "get_csum")]
pub fn csum(&self) -> Option<glib::GString> {
#[doc(alias = "get_label")]
pub fn label(&self, relpath: &str, unix_mode: u32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_label = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_label = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sepolicy_get_label(self.to_glib_none().0, relpath.to_glib_none().0, unix_mode, &mut out_label, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_label)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sepolicy_get_name")]
#[doc(alias = "get_name")]
- pub fn name(&self) -> glib::GString {
+ pub fn name(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::ostree_sepolicy_get_name(self.to_glib_none().0))
}
#[doc(alias = "ostree_sepolicy_restorecon")]
pub fn restorecon(&self, path: &str, info: Option<&gio::FileInfo>, target: &impl IsA<gio::File>, flags: SePolicyRestoreconFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_new_label = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_new_label = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sepolicy_restorecon(self.to_glib_none().0, path.to_glib_none().0, info.to_glib_none().0, target.as_ref().to_glib_none().0, flags.into_glib(), &mut out_new_label, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_new_label)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sepolicy_setfscreatecon")]
pub fn setfscreatecon(&self, path: &str, mode: u32) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sepolicy_setfscreatecon(self.to_glib_none().0, path.to_glib_none().0, mode, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "rootfs-dfd")]
pub fn rootfs_dfd(&self) -> i32 {
- glib::ObjectExt::property(self, "rootfs-dfd")
- }
-}
-
-impl fmt::Display for SePolicy {
- #[inline]
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str(&self.name())
+ ObjectExt::property(self, "rootfs-dfd")
}
}
// from gir-files
// DO NOT EDIT
-#[cfg(any(feature = "v2020_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
-use crate::Repo;
-use glib::object::IsA;
-#[cfg(any(feature = "v2020_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
-use glib::translate::*;
-use std::fmt;
-#[cfg(any(feature = "v2020_2", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
-use std::ptr;
+use crate::{ffi};
+#[cfg(feature = "v2020_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+use crate::{Repo};
+use glib::{prelude::*};
+#[cfg(feature = "v2020_2")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "OstreeSign")]
pub const NONE: Option<&'static Sign> = None;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
#[doc(alias = "ostree_sign_get_all")]
#[doc(alias = "get_all")]
pub fn all() -> Vec<Sign> {
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
#[doc(alias = "ostree_sign_get_by_name")]
#[doc(alias = "get_by_name")]
pub fn by_name(name: &str) -> Result<Sign, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sign_get_by_name(name.to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
}
}
-pub trait SignExt: 'static {
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+pub trait SignExt: IsA<Sign> + 'static {
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
#[doc(alias = "ostree_sign_add_pk")]
- fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_clear_keys")]
- fn clear_keys(&self) -> Result<(), glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_commit")]
- fn commit(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_commit_verify")]
- fn commit_verify(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_data")]
- fn data(&self, data: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Bytes, glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_data_verify")]
- fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant) -> Result<Option<glib::GString>, glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_get_name")]
- #[doc(alias = "get_name")]
- fn name(&self) -> glib::GString;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_load_pk")]
- fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_metadata_format")]
- fn metadata_format(&self) -> glib::GString;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_metadata_key")]
- fn metadata_key(&self) -> glib::GString;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_set_pk")]
- fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_set_sk")]
- fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error>;
-
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
- #[doc(alias = "ostree_sign_summary")]
- fn summary(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error>;
-}
-
-impl<O: IsA<Sign>> SignExt for O {
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_clear_keys")]
fn clear_keys(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_clear_keys(self.as_ref().to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_commit")]
fn commit(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_commit(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_commit_verify")]
fn commit_verify(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_success_message = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_success_message = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_commit_verify(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, &mut out_success_message, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_data")]
fn data(&self, data: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Bytes, glib::Error> {
unsafe {
- let mut signature = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut signature = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, &mut signature, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(signature)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_data_verify")]
fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant) -> Result<Option<glib::GString>, glib::Error> {
unsafe {
- let mut out_success_message = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_success_message = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, &mut out_success_message, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_get_name")]
+ #[doc(alias = "get_name")]
fn name(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::ostree_sign_get_name(self.as_ref().to_glib_none().0))
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_load_pk")]
fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_metadata_format")]
fn metadata_format(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::ostree_sign_metadata_format(self.as_ref().to_glib_none().0))
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_metadata_key")]
fn metadata_key(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::ostree_sign_metadata_key(self.as_ref().to_glib_none().0))
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_set_pk")]
fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_set_sk")]
fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
+ #[doc(alias = "ostree_sign_summary")]
fn summary(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sign_summary(self.as_ref().to_glib_none().0, repo.to_glib_none().0, keys.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
}
-impl fmt::Display for Sign {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("Sign")
- }
-}
+impl<O: IsA<Sign>> SignExt for O {}
// from gir-files
// DO NOT EDIT
-use crate::Deployment;
-#[cfg(any(feature = "v2016_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
-use crate::DeploymentUnlockedState;
-#[cfg(any(feature = "v2017_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
-use crate::Repo;
-#[cfg(any(feature = "v2020_7", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
-use crate::SysrootDeployTreeOpts;
-use crate::SysrootSimpleWriteDeploymentFlags;
-#[cfg(any(feature = "v2017_4", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
-use crate::SysrootWriteDeploymentsOpts;
-use glib::object::IsA;
-#[cfg(any(feature = "v2017_10", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
-use glib::object::ObjectType as ObjectType_;
-#[cfg(any(feature = "v2017_10", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
-use glib::signal::connect_raw;
-#[cfg(any(feature = "v2017_10", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
-use glib::signal::SignalHandlerId;
-use glib::translate::*;
-use std::boxed::Box as Box_;
-use std::fmt;
-use std::mem;
-#[cfg(any(feature = "v2017_10", feature = "dox"))]
-#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
-use std::mem::transmute;
-use std::pin::Pin;
-use std::ptr;
+use crate::{ffi,Deployment,SysrootSimpleWriteDeploymentFlags};
+#[cfg(feature = "v2016_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
+use crate::{DeploymentUnlockedState};
+#[cfg(feature = "v2017_4")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
+use crate::{SysrootWriteDeploymentsOpts};
+#[cfg(feature = "v2017_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
+use crate::{Repo};
+#[cfg(feature = "v2020_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
+use crate::{SysrootDeployTreeOpts};
+use glib::{prelude::*,translate::*};
+#[cfg(feature = "v2017_10")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
+use glib::{object::ObjectType as _,signal::{connect_raw, SignalHandlerId}};
+use std::{boxed::Box as Box_,pin::Pin};
glib::wrapper! {
#[doc(alias = "OstreeSysroot")]
}
}
+ #[cfg(feature = "v2023_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_8")))]
+ #[doc(alias = "ostree_sysroot_change_finalization")]
+ pub fn change_finalization(&self, deployment: &Deployment) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = std::ptr::null_mut();
+ let is_ok = ffi::ostree_sysroot_change_finalization(self.to_glib_none().0, deployment.to_glib_none().0, &mut error);
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
#[doc(alias = "ostree_sysroot_cleanup")]
pub fn cleanup(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_cleanup(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- //#[cfg(any(feature = "v2018_6", feature = "dox"))]
- //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ //#[cfg(feature = "v2018_6")]
+ //#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
//#[doc(alias = "ostree_sysroot_cleanup_prune_repo")]
//pub fn cleanup_prune_repo(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(i32, i32, u64), glib::Error> {
// unsafe { TODO: call ffi:ostree_sysroot_cleanup_prune_repo() }
//}
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
#[doc(alias = "ostree_sysroot_deploy_tree")]
pub fn deploy_tree(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, provided_merge_deployment: Option<&Deployment>, override_kernel_argv: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
unsafe {
- let mut out_new_deployment = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_new_deployment = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deploy_tree(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, provided_merge_deployment.to_glib_none().0, override_kernel_argv.to_glib_none().0, &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_sysroot_deploy_tree_with_options")]
pub fn deploy_tree_with_options(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, provided_merge_deployment: Option<&Deployment>, opts: Option<&SysrootDeployTreeOpts>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
unsafe {
- let mut out_new_deployment = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_new_deployment = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deploy_tree_with_options(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, provided_merge_deployment.to_glib_none().0, mut_override(opts.to_glib_none().0), &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
}
}
+ #[doc(alias = "ostree_sysroot_deployment_kexec_load")]
+ pub fn deployment_kexec_load(&self, deployment: &Deployment, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = std::ptr::null_mut();
+ let is_ok = ffi::ostree_sysroot_deployment_kexec_load(self.to_glib_none().0, deployment.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
#[doc(alias = "ostree_sysroot_deployment_set_kargs")]
pub fn deployment_set_kargs(&self, deployment: &Deployment, new_kargs: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deployment_set_kargs(self.to_glib_none().0, deployment.to_glib_none().0, new_kargs.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_deployment_set_kargs_in_place")]
pub fn deployment_set_kargs_in_place(&self, deployment: &Deployment, kargs_str: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deployment_set_kargs_in_place(self.to_glib_none().0, deployment.to_glib_none().0, kargs_str.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_deployment_set_mutable")]
pub fn deployment_set_mutable(&self, deployment: &Deployment, is_mutable: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deployment_set_mutable(self.to_glib_none().0, deployment.to_glib_none().0, is_mutable.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
#[doc(alias = "ostree_sysroot_deployment_set_pinned")]
pub fn deployment_set_pinned(&self, deployment: &Deployment, is_pinned: bool) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deployment_set_pinned(self.to_glib_none().0, deployment.to_glib_none().0, is_pinned.into_glib(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
#[doc(alias = "ostree_sysroot_deployment_unlock")]
pub fn deployment_unlock(&self, deployment: &Deployment, unlocked_state: DeploymentUnlockedState, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_deployment_unlock(self.to_glib_none().0, deployment.to_glib_none().0, unlocked_state.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_ensure_initialized")]
pub fn ensure_initialized(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_ensure_initialized(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
}
}
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
#[doc(alias = "ostree_sysroot_get_staged_deployment")]
#[doc(alias = "get_staged_deployment")]
pub fn staged_deployment(&self) -> Option<Deployment> {
}
}
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
#[doc(alias = "ostree_sysroot_init_osname")]
pub fn init_osname(&self, osname: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_init_osname(self.to_glib_none().0, osname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
#[doc(alias = "ostree_sysroot_initialize")]
pub fn initialize(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_initialize(self.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2022_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_7")))]
+ #[cfg(feature = "v2022_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2022_7")))]
#[doc(alias = "ostree_sysroot_initialize_with_mount_namespace")]
pub fn initialize_with_mount_namespace(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_initialize_with_mount_namespace(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
#[doc(alias = "ostree_sysroot_is_booted")]
pub fn is_booted(&self) -> bool {
unsafe {
#[doc(alias = "ostree_sysroot_load")]
pub fn load(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_load(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
#[doc(alias = "ostree_sysroot_load_if_changed")]
pub fn load_if_changed(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
unsafe {
- let mut out_changed = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_changed = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_load_if_changed(self.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_lock")]
pub fn lock(&self) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_lock(self.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
let user_data: Box_<glib::thread_guard::ThreadGuard<P>> = Box_::new(glib::thread_guard::ThreadGuard::new(callback));
unsafe extern "C" fn lock_async_trampoline<P: FnOnce(Result<(), glib::Error>) + 'static>(_source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer) {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let _ = ffi::ostree_sysroot_lock_finish(_source_object as *mut _, res, &mut error);
let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) };
let callback: Box_<glib::thread_guard::ThreadGuard<P>> = Box_::from_raw(user_data as *mut _);
#[doc(alias = "ostree_sysroot_prepare_cleanup")]
pub fn prepare_cleanup(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_prepare_cleanup(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+ #[cfg(feature = "v2017_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
#[doc(alias = "ostree_sysroot_query_deployments_for")]
pub fn query_deployments_for(&self, osname: Option<&str>) -> (Option<Deployment>, Option<Deployment>) {
unsafe {
- let mut out_pending = ptr::null_mut();
- let mut out_rollback = ptr::null_mut();
+ let mut out_pending = std::ptr::null_mut();
+ let mut out_rollback = std::ptr::null_mut();
ffi::ostree_sysroot_query_deployments_for(self.to_glib_none().0, osname.to_glib_none().0, &mut out_pending, &mut out_rollback);
(from_glib_full(out_pending), from_glib_full(out_rollback))
}
}
- #[cfg(any(feature = "v2017_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+ #[cfg(feature = "v2017_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
#[doc(alias = "ostree_sysroot_repo")]
pub fn repo(&self) -> Repo {
unsafe {
}
}
- #[cfg(any(feature = "v2021_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+ #[cfg(feature = "v2021_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
#[doc(alias = "ostree_sysroot_require_booted_deployment")]
pub fn require_booted_deployment(&self) -> Result<Deployment, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sysroot_require_booted_deployment(self.to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
#[doc(alias = "ostree_sysroot_set_mount_namespace_in_use")]
pub fn set_mount_namespace_in_use(&self) {
unsafe {
#[doc(alias = "ostree_sysroot_simple_write_deployment")]
pub fn simple_write_deployment(&self, osname: Option<&str>, new_deployment: &Deployment, merge_deployment: Option<&Deployment>, flags: SysrootSimpleWriteDeploymentFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_simple_write_deployment(self.to_glib_none().0, osname.to_glib_none().0, new_deployment.to_glib_none().0, merge_deployment.to_glib_none().0, flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_sysroot_stage_overlay_initrd")]
pub fn stage_overlay_initrd(&self, fd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
unsafe {
- let mut out_checksum = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_checksum = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_stage_overlay_initrd(self.to_glib_none().0, fd, &mut out_checksum, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_checksum)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
#[doc(alias = "ostree_sysroot_stage_tree")]
pub fn stage_tree(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, merge_deployment: Option<&Deployment>, override_kernel_argv: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
unsafe {
- let mut out_new_deployment = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_new_deployment = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_stage_tree(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, merge_deployment.to_glib_none().0, override_kernel_argv.to_glib_none().0, &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
#[doc(alias = "ostree_sysroot_stage_tree_with_options")]
pub fn stage_tree_with_options(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, merge_deployment: Option<&Deployment>, opts: &SysrootDeployTreeOpts, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
unsafe {
- let mut out_new_deployment = ptr::null_mut();
- let mut error = ptr::null_mut();
+ let mut out_new_deployment = std::ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_stage_tree_with_options(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, merge_deployment.to_glib_none().0, mut_override(opts.to_glib_none().0), &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_try_lock")]
pub fn try_lock(&self) -> Result<bool, glib::Error> {
unsafe {
- let mut out_acquired = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_acquired = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_try_lock(self.to_glib_none().0, out_acquired.as_mut_ptr(), &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_acquired.assume_init())) } else { Err(from_glib_full(error)) }
}
}
}
}
+ #[cfg(feature = "v2023_11")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_11")))]
+ #[doc(alias = "ostree_sysroot_update_post_copy")]
+ pub fn update_post_copy(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = std::ptr::null_mut();
+ let is_ok = ffi::ostree_sysroot_update_post_copy(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
#[doc(alias = "ostree_sysroot_write_deployments")]
pub fn write_deployments(&self, new_deployments: &[Deployment], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_write_deployments(self.to_glib_none().0, new_deployments.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
- #[cfg(any(feature = "v2017_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+ #[cfg(feature = "v2017_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
#[doc(alias = "ostree_sysroot_write_deployments_with_options")]
pub fn write_deployments_with_options(&self, new_deployments: &[Deployment], opts: &SysrootWriteDeploymentsOpts, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_write_deployments_with_options(self.to_glib_none().0, new_deployments.to_glib_none().0, mut_override(opts.to_glib_none().0), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_write_origin_file")]
pub fn write_origin_file(&self, deployment: &Deployment, new_origin: Option<&glib::KeyFile>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_write_origin_file(self.to_glib_none().0, deployment.to_glib_none().0, new_origin.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
}
}
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
#[doc(alias = "journal-msg")]
pub fn connect_journal_msg<F: Fn(&Self, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId {
- unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) {
+ unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut std::ffi::c_char, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), &glib::GString::from_glib_borrow(msg))
}
unsafe {
let f: Box_<F> = Box_::new(f);
- connect_raw(self.as_ptr() as *mut _, b"journal-msg\0".as_ptr() as *const _,
- Some(transmute::<_, unsafe extern "C" fn()>(journal_msg_trampoline::<F> as *const ())), Box_::into_raw(f))
+ connect_raw(self.as_ptr() as *mut _, c"journal-msg".as_ptr() as *const _,
+ Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(journal_msg_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
}
unsafe impl Send for Sysroot {}
-
-impl fmt::Display for Sysroot {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("Sysroot")
- }
-}
// from gir-files
// DO NOT EDIT
-use crate::AsyncProgress;
-use crate::Repo;
-use crate::RepoPullFlags;
-use crate::Sysroot;
-use crate::SysrootUpgraderFlags;
-use crate::SysrootUpgraderPullFlags;
-use glib::object::IsA;
-use glib::object::ObjectType as ObjectType_;
-use glib::translate::*;
-use glib::StaticType;
-use std::fmt;
-use std::mem;
-use std::ptr;
+use crate::{ffi,AsyncProgress,Repo,RepoPullFlags,Sysroot,SysrootUpgraderFlags,SysrootUpgraderPullFlags};
+use glib::{prelude::*,translate::*};
glib::wrapper! {
#[doc(alias = "OstreeSysrootUpgrader")]
#[doc(alias = "ostree_sysroot_upgrader_new")]
pub fn new(sysroot: &Sysroot, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sysroot_upgrader_new(sysroot.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "new_for_os")]
pub fn for_os(sysroot: &Sysroot, osname: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sysroot_upgrader_new_for_os(sysroot.to_glib_none().0, osname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "new_for_os_with_flags")]
pub fn for_os_with_flags(sysroot: &Sysroot, osname: Option<&str>, flags: SysrootUpgraderFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let ret = ffi::ostree_sysroot_upgrader_new_for_os_with_flags(sysroot.to_glib_none().0, osname.to_glib_none().0, flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
}
#[doc(alias = "ostree_sysroot_upgrader_deploy")]
pub fn deploy(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_upgrader_deploy(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_upgrader_pull")]
pub fn pull(&self, flags: RepoPullFlags, upgrader_flags: SysrootUpgraderPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
unsafe {
- let mut out_changed = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_changed = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_upgrader_pull(self.to_glib_none().0, flags.into_glib(), upgrader_flags.into_glib(), progress.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_upgrader_pull_one_dir")]
pub fn pull_one_dir(&self, dir_to_pull: &str, flags: RepoPullFlags, upgrader_flags: SysrootUpgraderPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
unsafe {
- let mut out_changed = mem::MaybeUninit::uninit();
- let mut error = ptr::null_mut();
+ let mut out_changed = std::mem::MaybeUninit::uninit();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_upgrader_pull_one_dir(self.to_glib_none().0, dir_to_pull.to_glib_none().0, flags.into_glib(), upgrader_flags.into_glib(), progress.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
}
}
#[doc(alias = "ostree_sysroot_upgrader_set_origin")]
pub fn set_origin(&self, origin: Option<&glib::KeyFile>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_upgrader_set_origin(self.to_glib_none().0, origin.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
pub fn flags(&self) -> SysrootUpgraderFlags {
- glib::ObjectExt::property(self, "flags")
+ ObjectExt::property(self, "flags")
}
pub fn osname(&self) -> Option<glib::GString> {
- glib::ObjectExt::property(self, "osname")
+ ObjectExt::property(self, "osname")
}
pub fn sysroot(&self) -> Option<Sysroot> {
- glib::ObjectExt::property(self, "sysroot")
+ ObjectExt::property(self, "sysroot")
}
#[doc(alias = "ostree_sysroot_upgrader_check_timestamps")]
pub fn check_timestamps(repo: &Repo, from_rev: &str, to_rev: &str) -> Result<(), glib::Error> {
unsafe {
- let mut error = ptr::null_mut();
+ let mut error = std::ptr::null_mut();
let is_ok = ffi::ostree_sysroot_upgrader_check_timestamps(repo.to_glib_none().0, from_rev.to_glib_none().0, to_rev.to_glib_none().0, &mut error);
- assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
+ debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
}
-
-impl fmt::Display for SysrootUpgrader {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str("SysrootUpgrader")
- }
-}
-Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
-from gir-files (@ e93ebd738598)
+Generated by gir (https://github.com/gtk-rs/gir @ 5433e2582f83)
+from gir-files (@ 1ceef435b152)
[package.metadata.docs.rs]
features = ["dox"]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
[package.metadata.system-deps.ostree_1]
name = "ostree-1"
// from gir-files
// DO NOT EDIT
-#[cfg(not(feature = "dox"))]
+#[cfg(not(docsrs))]
use std::process;
-#[cfg(feature = "dox")]
+#[cfg(docsrs)]
fn main() {} // prevent linking libraries to avoid documentation failure
-#[cfg(not(feature = "dox"))]
+#[cfg(not(docsrs))]
fn main() {
if let Err(s) = system_deps::Config::new().probe() {
println!("cargo:warning={s}");
-Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
-from gir-files (@ e93ebd738598)
+Generated by gir (https://github.com/gtk-rs/gir @ 5433e2582f83)
+from gir-files (@ 1ceef435b152)
clippy::unreadable_literal,
clippy::upper_case_acronyms
)]
-#![cfg_attr(feature = "dox", feature(doc_cfg))]
+#![cfg_attr(docsrs, feature(doc_cfg))]
+
+use gio_sys as gio;
+use glib_sys as glib;
+use gobject_sys as gobject;
mod manual;
pub use manual::*;
+#[cfg(unix)]
+#[allow(unused_imports)]
+use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
-use libc::{
+use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
+#[allow(unused_imports)]
+use std::ffi::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
- intptr_t, size_t, ssize_t, uintptr_t, FILE,
};
#[allow(unused_imports)]
pub const OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE: OstreeStaticDeltaIndexFlags = 0;
// Constants
-pub const OSTREE_COMMIT_GVARIANT_STRING: *const c_char =
- b"(a{sv}aya(say)sstayay)\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_ARCHITECTURE: *const c_char =
- b"ostree.architecture\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_COLLECTION_BINDING: *const c_char =
- b"ostree.collection-binding\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE: *const c_char =
- b"ostree.endoflife\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE: *const c_char =
- b"ostree.endoflife-rebase\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_REF_BINDING: *const c_char =
- b"ostree.ref-binding\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_SOURCE_TITLE: *const c_char =
- b"ostree.source-title\0" as *const u8 as *const c_char;
-pub const OSTREE_COMMIT_META_KEY_VERSION: *const c_char =
- b"version\0" as *const u8 as *const c_char;
-pub const OSTREE_DIRMETA_GVARIANT_STRING: *const c_char =
- b"(uuua(ayay))\0" as *const u8 as *const c_char;
-pub const OSTREE_FILEMETA_GVARIANT_STRING: *const c_char =
- b"(uuua(ayay))\0" as *const u8 as *const c_char;
-pub const OSTREE_GPG_KEY_GVARIANT_STRING: *const c_char =
- b"(aa{sv}aa{sv}a{sv})\0" as *const u8 as *const c_char;
+pub const OSTREE_COMMIT_GVARIANT_STRING: &[u8] = b"(a{sv}aya(say)sstayay)\0";
+pub const OSTREE_COMMIT_META_KEY_ARCHITECTURE: &[u8] = b"ostree.architecture\0";
+pub const OSTREE_COMMIT_META_KEY_COLLECTION_BINDING: &[u8] = b"ostree.collection-binding\0";
+pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE: &[u8] = b"ostree.endoflife\0";
+pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE: &[u8] = b"ostree.endoflife-rebase\0";
+pub const OSTREE_COMMIT_META_KEY_REF_BINDING: &[u8] = b"ostree.ref-binding\0";
+pub const OSTREE_COMMIT_META_KEY_SOURCE_TITLE: &[u8] = b"ostree.source-title\0";
+pub const OSTREE_COMMIT_META_KEY_VERSION: &[u8] = b"version\0";
+pub const OSTREE_DIRMETA_GVARIANT_STRING: &[u8] = b"(uuua(ayay))\0";
+pub const OSTREE_FILEMETA_GVARIANT_STRING: &[u8] = b"(uuua(ayay))\0";
+pub const OSTREE_GPG_KEY_GVARIANT_STRING: &[u8] = b"(aa{sv}aa{sv}a{sv})\0";
pub const OSTREE_MAX_METADATA_SIZE: c_int = 134217728;
pub const OSTREE_MAX_METADATA_WARN_SIZE: c_int = 7340032;
-pub const OSTREE_METADATA_KEY_BOOTABLE: *const c_char =
- b"ostree.bootable\0" as *const u8 as *const c_char;
-pub const OSTREE_METADATA_KEY_LINUX: *const c_char =
- b"ostree.linux\0" as *const u8 as *const c_char;
-pub const OSTREE_META_KEY_DEPLOY_COLLECTION_ID: *const c_char =
- b"ostree.deploy-collection-id\0" as *const u8 as *const c_char;
-pub const OSTREE_ORIGIN_TRANSIENT_GROUP: *const c_char =
- b"libostree-transient\0" as *const u8 as *const c_char;
-pub const OSTREE_PATH_BOOTED: *const c_char = b"/run/ostree-booted\0" as *const u8 as *const c_char;
-pub const OSTREE_REPO_METADATA_REF: *const c_char =
- b"ostree-metadata\0" as *const u8 as *const c_char;
+pub const OSTREE_METADATA_KEY_BOOTABLE: &[u8] = b"ostree.bootable\0";
+pub const OSTREE_METADATA_KEY_LINUX: &[u8] = b"ostree.linux\0";
+pub const OSTREE_META_KEY_DEPLOY_COLLECTION_ID: &[u8] = b"ostree.deploy-collection-id\0";
+pub const OSTREE_ORIGIN_TRANSIENT_GROUP: &[u8] = b"libostree-transient\0";
+pub const OSTREE_PATH_BOOTED: &[u8] = b"/run/ostree-booted\0";
+pub const OSTREE_REPO_METADATA_REF: &[u8] = b"ostree-metadata\0";
pub const OSTREE_SHA256_DIGEST_LEN: c_int = 32;
pub const OSTREE_SHA256_STRING_LEN: c_int = 64;
-pub const OSTREE_SIGN_NAME_ED25519: *const c_char = b"ed25519\0" as *const u8 as *const c_char;
-pub const OSTREE_SUMMARY_GVARIANT_STRING: *const c_char =
- b"(a(s(taya{sv}))a{sv})\0" as *const u8 as *const c_char;
-pub const OSTREE_SUMMARY_SIG_GVARIANT_STRING: *const c_char =
- b"a{sv}\0" as *const u8 as *const c_char;
+pub const OSTREE_SIGN_NAME_ED25519: &[u8] = b"ed25519\0";
+pub const OSTREE_SUMMARY_GVARIANT_STRING: &[u8] = b"(a(s(taya{sv}))a{sv})\0";
+pub const OSTREE_SUMMARY_SIG_GVARIANT_STRING: &[u8] = b"a{sv}\0";
pub const OSTREE_TIMESTAMP: c_int = 0;
-pub const OSTREE_TREE_GVARIANT_STRING: *const c_char =
- b"(a(say)a(sayay))\0" as *const u8 as *const c_char;
+pub const OSTREE_TREE_GVARIANT_STRING: &[u8] = b"(a(say)a(sayay))\0";
// Flags
pub type OstreeChecksumFlags = c_uint;
pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED: OstreeRepoCommitModifierFlags = 8;
pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME: OstreeRepoCommitModifierFlags = 16;
pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL: OstreeRepoCommitModifierFlags = 32;
+pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1: OstreeRepoCommitModifierFlags = 64;
pub type OstreeRepoCommitState = c_uint;
pub const OSTREE_REPO_COMMIT_STATE_NORMAL: OstreeRepoCommitState = 0;
pub type OstreeSysrootUpgraderFlags = c_uint;
pub const OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED: OstreeSysrootUpgraderFlags = 2;
pub const OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE: OstreeSysrootUpgraderFlags = 4;
+pub const OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC: OstreeSysrootUpgraderFlags = 8;
pub type OstreeSysrootUpgraderPullFlags = c_uint;
pub const OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE: OstreeSysrootUpgraderPullFlags = 0;
}
#[repr(C)]
+#[allow(dead_code)]
pub struct _OstreeKernelArgs {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
-pub type OstreeKernelArgs = *mut _OstreeKernelArgs;
+pub type OstreeKernelArgs = _OstreeKernelArgs;
#[derive(Copy, Clone)]
#[repr(C)]
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRemote {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoCheckoutOptions {
pub mode: OstreeRepoCheckoutMode,
pub overwrite_mode: OstreeRepoCheckoutOverwriteMode,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoCommitModifier {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoDevInoCache {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoExportArchiveOptions {
pub disable_xattrs: c_uint,
_truncated_record_marker: c_void,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoImportArchiveOptions {
pub ignore_unsupported_content: c_uint,
_truncated_record_marker: c_void,
#[derive(Copy, Clone)]
#[repr(C)]
pub struct OstreeSysrootDeployTreeOpts {
- pub unused_bools: [gboolean; 8],
+ pub locked: gboolean,
+ pub unused_bools: [gboolean; 7],
pub unused_ints: [c_int; 8],
pub override_kernel_argv: *mut *mut c_char,
pub overlay_initrds: *mut *mut c_char,
impl ::std::fmt::Debug for OstreeSysrootDeployTreeOpts {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("OstreeSysrootDeployTreeOpts @ {self:p}"))
+ .field("locked", &self.locked)
.field("unused_bools", &self.unused_bools)
.field("unused_ints", &self.unused_ints)
.field("override_kernel_argv", &self.override_kernel_argv)
// Classes
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeAsyncProgress {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeBootconfigParser {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeContentWriter {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeDeployment {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeGpgVerifyResult {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeMutableTree {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepo {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoFile {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoFinderAvahi {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoFinderConfig {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoFinderMount {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoFinderOverride {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeSePolicy {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeSysroot {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeSysrootUpgrader {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
// Interfaces
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeRepoFinder {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
#[repr(C)]
+#[allow(dead_code)]
pub struct OstreeSign {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
}
-#[link(name = "ostree-1")]
extern "C" {
//=========================================================================
//=========================================================================
// OstreeCollectionRef
//=========================================================================
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_new(
collection_id: *const c_char,
ref_name: *const c_char,
) -> *mut OstreeCollectionRef;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_dup(ref_: *const OstreeCollectionRef) -> *mut OstreeCollectionRef;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_equal(ref1: gconstpointer, ref2: gconstpointer) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_free(ref_: *mut OstreeCollectionRef);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_hash(ref_: gconstpointer) -> c_uint;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_dupv(
refs: *const *const OstreeCollectionRef,
) -> *mut *mut OstreeCollectionRef;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_collection_ref_freev(refs: *mut *mut OstreeCollectionRef);
//=========================================================================
// OstreeCommitSizesEntry
//=========================================================================
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_commit_sizes_entry_get_type() -> GType;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_commit_sizes_entry_new(
checksum: *const c_char,
objtype: OstreeObjectType,
unpacked: u64,
archived: u64,
) -> *mut OstreeCommitSizesEntry;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_commit_sizes_entry_copy(
entry: *const OstreeCommitSizesEntry,
) -> *mut OstreeCommitSizesEntry;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_commit_sizes_entry_free(entry: *mut OstreeCommitSizesEntry);
//=========================================================================
//=========================================================================
// OstreeKernelArgs
//=========================================================================
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_append(kargs: *mut OstreeKernelArgs, arg: *const c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_append_argv(kargs: *mut OstreeKernelArgs, argv: *mut *mut c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_append_argv_filtered(
kargs: *mut OstreeKernelArgs,
argv: *mut *mut c_char,
prefixes: *mut *mut c_char,
);
- #[cfg(any(feature = "v2022_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_5")))]
+ #[cfg(feature = "v2022_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2022_5")))]
pub fn ostree_kernel_args_append_if_missing(kargs: *mut OstreeKernelArgs, arg: *const c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_append_proc_cmdline(
kargs: *mut OstreeKernelArgs,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2022_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_7")))]
+ #[cfg(feature = "v2022_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2022_7")))]
pub fn ostree_kernel_args_contains(
kargs: *mut OstreeKernelArgs,
arg: *const c_char,
arg: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2022_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_7")))]
+ #[cfg(feature = "v2022_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2022_7")))]
pub fn ostree_kernel_args_delete_if_present(
kargs: *mut OstreeKernelArgs,
arg: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_delete_key_entry(
kargs: *mut OstreeKernelArgs,
key: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_free(kargs: *mut OstreeKernelArgs);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_get_last_value(
kargs: *mut OstreeKernelArgs,
key: *const c_char,
) -> *const c_char;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_new_replace(
kargs: *mut OstreeKernelArgs,
arg: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_parse_append(kargs: *mut OstreeKernelArgs, options: *const c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_replace(kargs: *mut OstreeKernelArgs, arg: *const c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_replace_argv(kargs: *mut OstreeKernelArgs, argv: *mut *mut c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_replace_take(kargs: *mut OstreeKernelArgs, arg: *mut c_char);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_to_string(kargs: *mut OstreeKernelArgs) -> *mut c_char;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_to_strv(kargs: *mut OstreeKernelArgs) -> *mut *mut c_char;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_cleanup(loc: *mut c_void);
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_from_string(options: *const c_char) -> *mut OstreeKernelArgs;
- #[cfg(any(feature = "v2019_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_3")))]
+ #[cfg(feature = "v2019_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_3")))]
pub fn ostree_kernel_args_new() -> *mut OstreeKernelArgs;
//=========================================================================
// OstreeRemote
//=========================================================================
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_remote_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_remote_get_name(remote: *mut OstreeRemote) -> *const c_char;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_remote_get_url(remote: *mut OstreeRemote) -> *mut c_char;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_remote_ref(remote: *mut OstreeRemote) -> *mut OstreeRemote;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_remote_unref(remote: *mut OstreeRemote);
//=========================================================================
// OstreeRepoCheckoutAtOptions
//=========================================================================
- #[cfg(any(feature = "v2017_13", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+ #[cfg(feature = "v2017_13")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
pub fn ostree_repo_checkout_at_options_set_devino(
opts: *mut OstreeRepoCheckoutAtOptions,
cache: *mut OstreeRepoDevInoCache,
pub fn ostree_repo_commit_modifier_ref(
modifier: *mut OstreeRepoCommitModifier,
) -> *mut OstreeRepoCommitModifier;
- #[cfg(any(feature = "v2017_13", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+ #[cfg(feature = "v2017_13")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
pub fn ostree_repo_commit_modifier_set_devino_cache(
modifier: *mut OstreeRepoCommitModifier,
cache: *mut OstreeRepoDevInoCache,
modifier: *mut OstreeRepoCommitModifier,
sepolicy: *mut OstreeSePolicy,
);
- #[cfg(any(feature = "v2020_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
+ #[cfg(feature = "v2020_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
pub fn ostree_repo_commit_modifier_set_sepolicy_from_commit(
modifier: *mut OstreeRepoCommitModifier,
repo: *mut OstreeRepo,
//=========================================================================
// OstreeRepoFinderResult
//=========================================================================
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_result_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_result_new(
remote: *mut OstreeRemote,
finder: *mut OstreeRepoFinder,
ref_to_timestamp: *mut glib::GHashTable,
summary_last_modified: u64,
) -> *mut OstreeRepoFinderResult;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_result_compare(
a: *const OstreeRepoFinderResult,
b: *const OstreeRepoFinderResult,
) -> c_int;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_result_dup(
result: *mut OstreeRepoFinderResult,
) -> *mut OstreeRepoFinderResult;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_result_free(result: *mut OstreeRepoFinderResult);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_result_freev(results: *mut *mut OstreeRepoFinderResult);
//=========================================================================
changed: *mut gpointer,
user_data: gpointer,
) -> *mut OstreeAsyncProgress;
- #[cfg(any(feature = "v2019_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_6")))]
+ #[cfg(feature = "v2019_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_6")))]
pub fn ostree_async_progress_copy_state(
self_: *mut OstreeAsyncProgress,
dest: *mut OstreeAsyncProgress,
);
pub fn ostree_async_progress_finish(self_: *mut OstreeAsyncProgress);
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
pub fn ostree_async_progress_get(self_: *mut OstreeAsyncProgress, ...);
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
pub fn ostree_async_progress_get_status(self_: *mut OstreeAsyncProgress) -> *mut c_char;
pub fn ostree_async_progress_get_uint(
self_: *mut OstreeAsyncProgress,
self_: *mut OstreeAsyncProgress,
key: *const c_char,
) -> u64;
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
pub fn ostree_async_progress_get_variant(
self_: *mut OstreeAsyncProgress,
key: *const c_char,
) -> *mut glib::GVariant;
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
pub fn ostree_async_progress_set(self_: *mut OstreeAsyncProgress, ...);
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
pub fn ostree_async_progress_set_status(self_: *mut OstreeAsyncProgress, status: *const c_char);
pub fn ostree_async_progress_set_uint(
self_: *mut OstreeAsyncProgress,
key: *const c_char,
value: u64,
);
- #[cfg(any(feature = "v2017_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
+ #[cfg(feature = "v2017_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
pub fn ostree_async_progress_set_variant(
self_: *mut OstreeAsyncProgress,
key: *const c_char,
self_: *mut OstreeBootconfigParser,
key: *const c_char,
) -> *const c_char;
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_bootconfig_parser_get_overlay_initrds(
self_: *mut OstreeBootconfigParser,
) -> *mut *mut c_char;
key: *const c_char,
value: *const c_char,
);
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_bootconfig_parser_set_overlay_initrds(
self_: *mut OstreeBootconfigParser,
initrds: *mut *mut c_char,
bootcsum: *const c_char,
bootserial: c_int,
) -> *mut OstreeDeployment;
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
pub fn ostree_deployment_origin_remove_transient_state(origin: *mut glib::GKeyFile);
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_deployment_unlocked_state_to_string(
state: OstreeDeploymentUnlockedState,
) -> *const c_char;
pub fn ostree_deployment_get_origin(self_: *mut OstreeDeployment) -> *mut glib::GKeyFile;
pub fn ostree_deployment_get_origin_relpath(self_: *mut OstreeDeployment) -> *mut c_char;
pub fn ostree_deployment_get_osname(self_: *mut OstreeDeployment) -> *const c_char;
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_deployment_get_unlocked(
self_: *mut OstreeDeployment,
) -> OstreeDeploymentUnlockedState;
pub fn ostree_deployment_hash(v: gconstpointer) -> c_uint;
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2023_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_8")))]
+ pub fn ostree_deployment_is_finalization_locked(self_: *mut OstreeDeployment) -> gboolean;
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
pub fn ostree_deployment_is_pinned(self_: *mut OstreeDeployment) -> gboolean;
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
pub fn ostree_deployment_is_staged(self_: *mut OstreeDeployment) -> gboolean;
pub fn ostree_deployment_set_bootconfig(
self_: *mut OstreeDeployment,
key_id: *const c_char,
out_signature_index: *mut c_uint,
) -> gboolean;
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
pub fn ostree_gpg_verify_result_require_valid_signature(
result: *mut OstreeGpgVerifyResult,
error: *mut *mut glib::GError,
//=========================================================================
pub fn ostree_mutable_tree_get_type() -> GType;
pub fn ostree_mutable_tree_new() -> *mut OstreeMutableTree;
- #[cfg(any(feature = "v2018_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
+ #[cfg(feature = "v2018_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
pub fn ostree_mutable_tree_new_from_checksum(
repo: *mut OstreeRepo,
contents_checksum: *const c_char,
metadata_checksum: *const c_char,
) -> *mut OstreeMutableTree;
- #[cfg(any(feature = "v2021_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_5")))]
+ #[cfg(feature = "v2021_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_5")))]
pub fn ostree_mutable_tree_new_from_commit(
repo: *mut OstreeRepo,
rev: *const c_char,
error: *mut *mut glib::GError,
) -> *mut OstreeMutableTree;
- #[cfg(any(feature = "v2018_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
+ #[cfg(feature = "v2018_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
pub fn ostree_mutable_tree_check_error(
self_: *mut OstreeMutableTree,
error: *mut *mut glib::GError,
out_parent: *mut *mut OstreeMutableTree,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
+ #[cfg(feature = "v2018_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
pub fn ostree_mutable_tree_fill_empty_from_dirtree(
self_: *mut OstreeMutableTree,
repo: *mut OstreeRepo,
out_subdir: *mut *mut OstreeMutableTree,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_9", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+ #[cfg(feature = "v2018_9")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
pub fn ostree_mutable_tree_remove(
self_: *mut OstreeMutableTree,
name: *const c_char,
repo_path: *mut gio::GFile,
sysroot_path: *mut gio::GFile,
) -> *mut OstreeRepo;
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
pub fn ostree_repo_create_at(
dfd: c_int,
path: *const c_char,
out_mode: *mut OstreeRepoMode,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
pub fn ostree_repo_open_at(
dfd: c_int,
path: *const c_char,
progress: *mut OstreeAsyncProgress,
user_data: gpointer,
);
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_repo_traverse_new_parents() -> *mut glib::GHashTable;
pub fn ostree_repo_traverse_new_reachable() -> *mut glib::GHashTable;
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_repo_traverse_parents_get_commits(
parents: *mut glib::GHashTable,
object: *mut glib::GVariant,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_8")))]
+ #[cfg(feature = "v2016_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_8")))]
pub fn ostree_repo_checkout_at(
self_: *mut OstreeRepo,
options: *mut OstreeRepoCheckoutAtOptions,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
+ pub fn ostree_repo_checkout_composefs(
+ self_: *mut OstreeRepo,
+ options: *mut glib::GVariant,
+ destination_dfd: c_int,
+ destination_path: *const c_char,
+ checksum: *const c_char,
+ cancellable: *mut gio::GCancellable,
+ error: *mut *mut glib::GError,
+ ) -> gboolean;
pub fn ostree_repo_checkout_gc(
self_: *mut OstreeRepo,
cancellable: *mut gio::GCancellable,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_12", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_12")))]
+ #[cfg(feature = "v2017_12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_12")))]
pub fn ostree_repo_equal(a: *mut OstreeRepo, b: *mut OstreeRepo) -> gboolean;
pub fn ostree_repo_export_tree_to_archive(
self_: *mut OstreeRepo,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_find_remotes_async(
self_: *mut OstreeRepo,
refs: *const *const OstreeCollectionRef,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_find_remotes_finish(
self_: *mut OstreeRepo,
result: *mut gio::GAsyncResult,
error: *mut *mut glib::GError,
) -> *mut *mut OstreeRepoFinderResult;
- #[cfg(any(feature = "v2017_15", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
+ #[cfg(feature = "v2017_15")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
pub fn ostree_repo_fsck_object(
self_: *mut OstreeRepo,
objtype: OstreeObjectType,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2019_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_2")))]
+ #[cfg(feature = "v2019_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_2")))]
pub fn ostree_repo_get_bootloader(self_: *mut OstreeRepo) -> *const c_char;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_get_collection_id(self_: *mut OstreeRepo) -> *const c_char;
pub fn ostree_repo_get_config(self_: *mut OstreeRepo) -> *mut glib::GKeyFile;
- #[cfg(any(feature = "v2018_9", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+ #[cfg(feature = "v2018_9")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
pub fn ostree_repo_get_default_repo_finders(self_: *mut OstreeRepo) -> *const *const c_char;
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_repo_get_dfd(self_: *mut OstreeRepo) -> c_int;
pub fn ostree_repo_get_disable_fsync(self_: *mut OstreeRepo) -> gboolean;
- #[cfg(any(feature = "v2018_9", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
+ #[cfg(feature = "v2018_9")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
pub fn ostree_repo_get_min_free_space_bytes(
self_: *mut OstreeRepo,
out_reserved_bytes: *mut u64,
pub fn ostree_repo_get_mode(self_: *mut OstreeRepo) -> OstreeRepoMode;
pub fn ostree_repo_get_parent(self_: *mut OstreeRepo) -> *mut OstreeRepo;
pub fn ostree_repo_get_path(self_: *mut OstreeRepo) -> *mut gio::GFile;
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
pub fn ostree_repo_get_remote_boolean_option(
self_: *mut OstreeRepo,
remote_name: *const c_char,
out_value: *mut gboolean,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
pub fn ostree_repo_get_remote_list_option(
self_: *mut OstreeRepo,
remote_name: *const c_char,
out_value: *mut *mut *mut c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
pub fn ostree_repo_get_remote_option(
self_: *mut OstreeRepo,
remote_name: *const c_char,
out_value: *mut *mut c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_8")))]
+ #[cfg(feature = "v2020_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_8")))]
pub fn ostree_repo_gpg_sign_data(
self_: *mut OstreeRepo,
data: *mut glib::GBytes,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
pub fn ostree_repo_gpg_verify_data(
self_: *mut OstreeRepo,
remote_name: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_12", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_12")))]
+ #[cfg(feature = "v2017_12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_12")))]
pub fn ostree_repo_hash(self_: *mut OstreeRepo) -> c_uint;
pub fn ostree_repo_import_archive_to_mtree(
self_: *mut OstreeRepo,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
pub fn ostree_repo_import_object_from_with_trust(
self_: *mut OstreeRepo,
source: *mut OstreeRepo,
self_: *mut OstreeRepo,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_list_collection_refs(
self_: *mut OstreeRepo,
match_collection_id: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_repo_list_refs_ext(
self_: *mut OstreeRepo,
refspec_prefix: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_8")))]
+ #[cfg(feature = "v2020_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_8")))]
pub fn ostree_repo_list_static_delta_indexes(
self_: *mut OstreeRepo,
out_indexes: *mut *mut glib::GPtrArray,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2015_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
+ #[cfg(feature = "v2015_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
pub fn ostree_repo_load_commit(
self_: *mut OstreeRepo,
checksum: *const c_char,
out_variant: *mut *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2021_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_3")))]
+ #[cfg(feature = "v2021_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_3")))]
pub fn ostree_repo_lock_pop(
self_: *mut OstreeRepo,
lock_type: OstreeRepoLockType,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2021_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_3")))]
+ #[cfg(feature = "v2021_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_3")))]
pub fn ostree_repo_lock_push(
self_: *mut OstreeRepo,
lock_type: OstreeRepoLockType,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_15", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
+ #[cfg(feature = "v2017_15")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
pub fn ostree_repo_mark_commit_partial(
self_: *mut OstreeRepo,
checksum: *const c_char,
is_partial: gboolean,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2019_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_4")))]
+ #[cfg(feature = "v2019_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2019_4")))]
pub fn ostree_repo_mark_commit_partial_reason(
self_: *mut OstreeRepo,
checksum: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_1")))]
+ #[cfg(feature = "v2017_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_1")))]
pub fn ostree_repo_prune_from_reachable(
self_: *mut OstreeRepo,
options: *mut OstreeRepoPruneOptions,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_pull_from_remotes_async(
self_: *mut OstreeRepo,
results: *const *const OstreeRepoFinderResult,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_pull_from_remotes_finish(
self_: *mut OstreeRepo,
result: *mut gio::GAsyncResult,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2023_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2023_1")))]
+ #[cfg(feature = "v2023_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_1")))]
pub fn ostree_repo_regenerate_metadata(
self_: *mut OstreeRepo,
additional_metadata: *mut glib::GVariant,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_2")))]
+ #[cfg(feature = "v2017_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_2")))]
pub fn ostree_repo_reload_config(
self_: *mut OstreeRepo,
cancellable: *mut gio::GCancellable,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
pub fn ostree_repo_remote_fetch_summary_with_options(
self_: *mut OstreeRepo,
name: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2021_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+ #[cfg(feature = "v2021_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
pub fn ostree_repo_remote_get_gpg_keys(
self_: *mut OstreeRepo,
name: *const c_char,
self_: *mut OstreeRepo,
out_n_remotes: *mut c_uint,
) -> *mut *mut c_char;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_remote_list_collection_refs(
self_: *mut OstreeRepo,
remote_name: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_resolve_collection_ref(
self_: *mut OstreeRepo,
ref_: *const OstreeCollectionRef,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_resolve_keyring_for_collection(
self_: *mut OstreeRepo,
collection_id: *const c_char,
out_rev: *mut *mut c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_7")))]
+ #[cfg(feature = "v2016_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_7")))]
pub fn ostree_repo_resolve_rev_ext(
self_: *mut OstreeRepo,
refspec: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
pub fn ostree_repo_set_alias_ref_immediate(
self_: *mut OstreeRepo,
remote: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
pub fn ostree_repo_set_cache_dir(
self_: *mut OstreeRepo,
dfd: c_int,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_set_collection_id(
self_: *mut OstreeRepo,
collection_id: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_set_collection_ref_immediate(
self_: *mut OstreeRepo,
ref_: *const OstreeCollectionRef,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2021_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
+ #[cfg(feature = "v2021_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
pub fn ostree_repo_signature_verify_commit_data(
self_: *mut OstreeRepo,
remote_name: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_repo_static_delta_execute_offline_with_signature(
self_: *mut OstreeRepo,
dir_or_file: *mut gio::GFile,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_8")))]
+ #[cfg(feature = "v2020_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_8")))]
pub fn ostree_repo_static_delta_reindex(
repo: *mut OstreeRepo,
flags: OstreeStaticDeltaIndexFlags,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_repo_static_delta_verify_signature(
self_: *mut OstreeRepo,
delta_id: *const c_char,
out_success_message: *mut *mut c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_transaction_set_collection_ref(
self_: *mut OstreeRepo,
ref_: *const OstreeCollectionRef,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_repo_traverse_commit_union_with_parents(
repo: *mut OstreeRepo,
commit_checksum: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_repo_traverse_commit_with_flags(
repo: *mut OstreeRepo,
flags: OstreeRepoCommitTraverseFlags,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_traverse_reachable_refs(
self_: *mut OstreeRepo,
depth: c_uint,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut OstreeGpgVerifyResult;
- #[cfg(any(feature = "v2016_14", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_14")))]
+ #[cfg(feature = "v2016_14")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_14")))]
pub fn ostree_repo_verify_commit_for_remote(
self_: *mut OstreeRepo,
commit_checksum: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2021_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
+ #[cfg(feature = "v2021_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
pub fn ostree_repo_write_regfile(
self_: *mut OstreeRepo,
expected_checksum: *const c_char,
xattrs: *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> *mut OstreeContentWriter;
- #[cfg(any(feature = "v2021_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
+ #[cfg(feature = "v2021_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
pub fn ostree_repo_write_regfile_inline(
self_: *mut OstreeRepo,
expected_checksum: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut c_char;
- #[cfg(any(feature = "v2021_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_2")))]
+ #[cfg(feature = "v2021_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_2")))]
pub fn ostree_repo_write_symlink(
self_: *mut OstreeRepo,
expected_checksum: *const c_char,
// OstreeRepoFinderAvahi
//=========================================================================
pub fn ostree_repo_finder_avahi_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_avahi_new(
context: *mut glib::GMainContext,
) -> *mut OstreeRepoFinderAvahi;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_avahi_start(
self_: *mut OstreeRepoFinderAvahi,
error: *mut *mut glib::GError,
);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_avahi_stop(self_: *mut OstreeRepoFinderAvahi);
//=========================================================================
// OstreeRepoFinderConfig
//=========================================================================
pub fn ostree_repo_finder_config_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_config_new() -> *mut OstreeRepoFinderConfig;
//=========================================================================
// OstreeRepoFinderMount
//=========================================================================
pub fn ostree_repo_finder_mount_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_mount_new(
monitor: *mut gio::GVolumeMonitor,
) -> *mut OstreeRepoFinderMount;
// OstreeRepoFinderOverride
//=========================================================================
pub fn ostree_repo_finder_override_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_override_new() -> *mut OstreeRepoFinderOverride;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_override_add_uri(
self_: *mut OstreeRepoFinderOverride,
uri: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut OstreeSePolicy;
- #[cfg(any(feature = "v2017_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+ #[cfg(feature = "v2017_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
pub fn ostree_sepolicy_new_at(
rootfs_dfd: c_int,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut OstreeSePolicy;
pub fn ostree_sepolicy_fscreatecon_cleanup(unused: *mut *mut c_void);
- #[cfg(any(feature = "v2016_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
+ #[cfg(feature = "v2016_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
pub fn ostree_sepolicy_get_csum(self_: *mut OstreeSePolicy) -> *const c_char;
pub fn ostree_sepolicy_get_label(
self_: *mut OstreeSePolicy,
pub fn ostree_sysroot_get_deployment_origin_path(
deployment_path: *mut gio::GFile,
) -> *mut gio::GFile;
+ #[cfg(feature = "v2023_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_8")))]
+ pub fn ostree_sysroot_change_finalization(
+ self_: *mut OstreeSysroot,
+ deployment: *mut OstreeDeployment,
+ error: *mut *mut glib::GError,
+ ) -> gboolean;
pub fn ostree_sysroot_cleanup(
self_: *mut OstreeSysroot,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_sysroot_cleanup_prune_repo(
sysroot: *mut OstreeSysroot,
options: *mut OstreeRepoPruneOptions,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_sysroot_deploy_tree(
self_: *mut OstreeSysroot,
osname: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_sysroot_deploy_tree_with_options(
self_: *mut OstreeSysroot,
osname: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
+ pub fn ostree_sysroot_deployment_kexec_load(
+ self_: *mut OstreeSysroot,
+ deployment: *mut OstreeDeployment,
+ cancellable: *mut gio::GCancellable,
+ error: *mut *mut glib::GError,
+ ) -> gboolean;
pub fn ostree_sysroot_deployment_set_kargs(
self_: *mut OstreeSysroot,
deployment: *mut OstreeDeployment,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
+ #[cfg(feature = "v2018_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
pub fn ostree_sysroot_deployment_set_pinned(
self_: *mut OstreeSysroot,
deployment: *mut OstreeDeployment,
is_pinned: gboolean,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_sysroot_deployment_unlock(
self_: *mut OstreeSysroot,
deployment: *mut OstreeDeployment,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_sysroot_get_staged_deployment(self_: *mut OstreeSysroot)
-> *mut OstreeDeployment;
pub fn ostree_sysroot_get_subbootversion(self_: *mut OstreeSysroot) -> c_int;
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_sysroot_init_osname(
self_: *mut OstreeSysroot,
osname: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_sysroot_initialize(
self_: *mut OstreeSysroot,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2022_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_7")))]
+ #[cfg(feature = "v2022_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2022_7")))]
pub fn ostree_sysroot_initialize_with_mount_namespace(
self_: *mut OstreeSysroot,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_sysroot_is_booted(self_: *mut OstreeSysroot) -> gboolean;
pub fn ostree_sysroot_load(
self_: *mut OstreeSysroot,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
+ #[cfg(feature = "v2016_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
pub fn ostree_sysroot_load_if_changed(
self_: *mut OstreeSysroot,
out_changed: *mut gboolean,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+ #[cfg(feature = "v2017_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
pub fn ostree_sysroot_query_deployments_for(
self_: *mut OstreeSysroot,
osname: *const c_char,
out_pending: *mut *mut OstreeDeployment,
out_rollback: *mut *mut OstreeDeployment,
);
- #[cfg(any(feature = "v2017_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
+ #[cfg(feature = "v2017_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
pub fn ostree_sysroot_repo(self_: *mut OstreeSysroot) -> *mut OstreeRepo;
- #[cfg(any(feature = "v2021_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+ #[cfg(feature = "v2021_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
pub fn ostree_sysroot_require_booted_deployment(
self_: *mut OstreeSysroot,
error: *mut *mut glib::GError,
) -> *mut OstreeDeployment;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_sysroot_set_mount_namespace_in_use(self_: *mut OstreeSysroot);
pub fn ostree_sysroot_simple_write_deployment(
sysroot: *mut OstreeSysroot,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_sysroot_stage_overlay_initrd(
self_: *mut OstreeSysroot,
fd: c_int,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_5", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
+ #[cfg(feature = "v2018_5")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
pub fn ostree_sysroot_stage_tree(
self_: *mut OstreeSysroot,
osname: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_7", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
+ #[cfg(feature = "v2020_7")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
pub fn ostree_sysroot_stage_tree_with_options(
self_: *mut OstreeSysroot,
osname: *const c_char,
) -> gboolean;
pub fn ostree_sysroot_unload(self_: *mut OstreeSysroot);
pub fn ostree_sysroot_unlock(self_: *mut OstreeSysroot);
+ #[cfg(feature = "v2023_11")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2023_11")))]
+ pub fn ostree_sysroot_update_post_copy(
+ self_: *mut OstreeSysroot,
+ cancellable: *mut gio::GCancellable,
+ error: *mut *mut glib::GError,
+ ) -> gboolean;
pub fn ostree_sysroot_write_deployments(
self_: *mut OstreeSysroot,
new_deployments: *mut glib::GPtrArray,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+ #[cfg(feature = "v2017_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
pub fn ostree_sysroot_write_deployments_with_options(
self_: *mut OstreeSysroot,
new_deployments: *mut glib::GPtrArray,
// OstreeRepoFinder
//=========================================================================
pub fn ostree_repo_finder_get_type() -> GType;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_resolve_all_async(
finders: *const *mut OstreeRepoFinder,
refs: *const *const OstreeCollectionRef,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_resolve_all_finish(
result: *mut gio::GAsyncResult,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_resolve_async(
self_: *mut OstreeRepoFinder,
refs: *const *const OstreeCollectionRef,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_repo_finder_resolve_finish(
self_: *mut OstreeRepoFinder,
result: *mut gio::GAsyncResult,
// OstreeSign
//=========================================================================
pub fn ostree_sign_get_type() -> GType;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_get_all() -> *mut glib::GPtrArray;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_get_by_name(
name: *const c_char,
error: *mut *mut glib::GError,
) -> *mut OstreeSign;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_add_pk(
self_: *mut OstreeSign,
public_key: *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_clear_keys(
self_: *mut OstreeSign,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_commit(
self_: *mut OstreeSign,
repo: *mut OstreeRepo,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_commit_verify(
self_: *mut OstreeSign,
repo: *mut OstreeRepo,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_data(
self_: *mut OstreeSign,
data: *mut glib::GBytes,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_data_verify(
self_: *mut OstreeSign,
data: *mut glib::GBytes,
secret_key: *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_get_name(self_: *mut OstreeSign) -> *const c_char;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_load_pk(
self_: *mut OstreeSign,
options: *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_metadata_format(self_: *mut OstreeSign) -> *const c_char;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_metadata_key(self_: *mut OstreeSign) -> *const c_char;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_set_pk(
self_: *mut OstreeSign,
public_key: *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_set_sk(
self_: *mut OstreeSign,
secret_key: *mut glib::GVariant,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2020_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
+ #[cfg(feature = "v2020_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
pub fn ostree_sign_summary(
self_: *mut OstreeSign,
repo: *mut OstreeRepo,
//=========================================================================
// Other functions
//=========================================================================
- #[cfg(any(feature = "v2017_15", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
+ #[cfg(feature = "v2017_15")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
pub fn ostree_break_hardlink(
dfd: c_int,
path: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+ #[cfg(feature = "v2017_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
pub fn ostree_check_version(required_year: c_uint, required_release: c_uint) -> gboolean;
- #[cfg(any(feature = "v2016_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_8")))]
+ #[cfg(feature = "v2016_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_8")))]
pub fn ostree_checksum_b64_from_bytes(csum: *const [c_uchar; 32]) -> *mut c_char;
pub fn ostree_checksum_b64_inplace_from_bytes(csum: *const [c_uchar; 32], buf: *mut c_char);
pub fn ostree_checksum_b64_inplace_to_bytes(checksum: *const [c_char; 32], buf: *mut u8);
- #[cfg(any(feature = "v2016_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_8")))]
+ #[cfg(feature = "v2016_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_8")))]
pub fn ostree_checksum_b64_to_bytes(checksum: *const c_char) -> *mut [c_uchar; 32];
pub fn ostree_checksum_bytes_peek(bytes: *mut glib::GVariant) -> *const [c_uchar; 32];
pub fn ostree_checksum_bytes_peek_validate(
out_csum: *mut *mut [*mut u8; 32],
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_13", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
+ #[cfg(feature = "v2017_13")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
pub fn ostree_checksum_file_at(
dfd: c_int,
path: *const c_char,
pub fn ostree_checksum_to_bytes(checksum: *const c_char) -> *mut [c_uchar; 32];
pub fn ostree_checksum_to_bytes_v(checksum: *const c_char) -> *mut glib::GVariant;
pub fn ostree_cmp_checksum_bytes(a: *const u8, b: *const u8) -> c_int;
- #[cfg(any(feature = "v2018_2", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
+ #[cfg(feature = "v2018_2")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
pub fn ostree_commit_get_content_checksum(commit_variant: *mut glib::GVariant) -> *mut c_char;
- #[cfg(any(feature = "v2020_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
+ #[cfg(feature = "v2020_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
pub fn ostree_commit_get_object_sizes(
commit_variant: *mut glib::GVariant,
out_sizes_entries: *mut *mut glib::GPtrArray,
error: *mut *mut glib::GError,
) -> gboolean;
pub fn ostree_commit_get_parent(commit_variant: *mut glib::GVariant) -> *mut c_char;
- #[cfg(any(feature = "v2016_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_3")))]
+ #[cfg(feature = "v2016_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_3")))]
pub fn ostree_commit_get_timestamp(commit_variant: *mut glib::GVariant) -> u64;
- #[cfg(any(feature = "v2021_1", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
+ #[cfg(feature = "v2021_1")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
pub fn ostree_commit_metadata_for_bootable(
root: *mut gio::GFile,
dict: *mut glib::GVariantDict,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_4", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
+ #[cfg(feature = "v2017_4")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
pub fn ostree_diff_dirs_with_options(
flags: OstreeDiffFlags,
a: *mut gio::GFile,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GVariant;
- #[cfg(any(feature = "v2017_10", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
+ #[cfg(feature = "v2017_10")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
pub fn ostree_gpg_error_quark() -> glib::GQuark;
pub fn ostree_hash_object_name(a: gconstpointer) -> c_uint;
pub fn ostree_metadata_variant_type(objtype: OstreeObjectType) -> *const glib::GVariantType;
out_ref: *mut *mut c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2016_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
+ #[cfg(feature = "v2016_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
pub fn ostree_raw_file_to_archive_z2_stream(
input: *mut gio::GInputStream,
file_info: *mut gio::GFileInfo,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_3", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_3")))]
+ #[cfg(feature = "v2017_3")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_3")))]
pub fn ostree_raw_file_to_archive_z2_stream_with_options(
input: *mut gio::GInputStream,
file_info: *mut gio::GFileInfo,
sha256: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2018_6", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
+ #[cfg(feature = "v2018_6")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
pub fn ostree_validate_collection_id(
collection_id: *const c_char,
error: *mut *mut glib::GError,
) -> gboolean;
- #[cfg(any(feature = "v2017_8", feature = "dox"))]
- #[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_8")))]
+ #[cfg(feature = "v2017_8")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "v2017_8")))]
pub fn ostree_validate_remote_name(
remote_name: *const c_char,
error: *mut *mut glib::GError,
// from gir-files
// DO NOT EDIT
+#![cfg(unix)]
+
use ostree_sys::*;
use std::env;
use std::error::Error;
use std::ffi::OsString;
use std::mem::{align_of, size_of};
use std::path::Path;
-use std::process::Command;
+use std::process::{Command, Stdio};
use std::str;
use tempfile::Builder;
let mut cmd = Command::new(pkg_config);
cmd.arg("--cflags");
cmd.args(packages);
+ cmd.stderr(Stdio::inherit());
let out = cmd.output()?;
if !out.status.success() {
- return Err(format!("command {cmd:?} returned {}", out.status).into());
+ let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
+ return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
}
let stdout = str::from_utf8(&out.stdout)?;
Ok(shell_words::split(stdout.trim())?)
}
#[test]
-#[cfg(target_os = "linux")]
fn cross_validate_constants_with_c() {
let mut c_constants: Vec<(String, String)> = Vec::new();
}
#[test]
-#[cfg(target_os = "linux")]
fn cross_validate_layout_with_c() {
let mut c_layouts = Vec::new();
let cc = Compiler::new().expect("configured compiler");
cc.compile(&c_file, &exe)?;
- let mut abi_cmd = Command::new(exe);
- let output = abi_cmd.output()?;
- if !output.status.success() {
- return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
+ let mut cmd = Command::new(exe);
+ cmd.stderr(Stdio::inherit());
+ let out = cmd.output()?;
+ if !out.status.success() {
+ let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
+ return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
}
- Ok(String::from_utf8(output.stdout)?)
+ Ok(String::from_utf8(out.stdout)?)
}
const RUST_LAYOUTS: &[(&str, Layout)] = &[
"2",
),
("(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE", "0"),
+ (
+ "(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1",
+ "64",
+ ),
("(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS", "1"),
("(guint) OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL", "2"),
("(guint) OSTREE_REPO_COMMIT_STATE_NORMAL", "0"),
"(guint) OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED",
"2",
),
+ ("(guint) OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC", "8"),
("(guint) OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE", "4"),
(
"(guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER",
#include <stdio.h>
#define PRINT_CONSTANT(CONSTANT_NAME) \
- printf ("%s;", #CONSTANT_NAME); \
- printf (_Generic ((CONSTANT_NAME), \
- char *: "%s", \
- const char *: "%s", \
- char: "%c", \
- signed char: "%hhd", \
- unsigned char: "%hhu", \
- short int: "%hd", \
- unsigned short int: "%hu", \
- int: "%d", \
- unsigned int: "%u", \
- long: "%ld", \
- unsigned long: "%lu", \
- long long: "%lld", \
- unsigned long long: "%llu", \
- float: "%f", \
- double: "%f", \
- long double: "%ld"), \
- CONSTANT_NAME); \
- printf ("\n");
+ printf("%s;", #CONSTANT_NAME); \
+ printf(_Generic((CONSTANT_NAME), \
+ char *: "%s", \
+ const char *: "%s", \
+ char: "%c", \
+ signed char: "%hhd", \
+ unsigned char: "%hhu", \
+ short int: "%hd", \
+ unsigned short int: "%hu", \
+ int: "%d", \
+ unsigned int: "%u", \
+ long: "%ld", \
+ unsigned long: "%lu", \
+ long long: "%lld", \
+ unsigned long long: "%llu", \
+ float: "%f", \
+ double: "%f", \
+ long double: "%ld"), \
+ CONSTANT_NAME); \
+ printf("\n");
-int
-main ()
-{
- PRINT_CONSTANT ((guint)OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS);
- PRINT_CONSTANT ((guint)OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS);
- PRINT_CONSTANT ((guint)OSTREE_CHECKSUM_FLAGS_NONE);
- PRINT_CONSTANT (OSTREE_COMMIT_GVARIANT_STRING);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_ARCHITECTURE);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_COLLECTION_BINDING);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_ENDOFLIFE);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_REF_BINDING);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_SOURCE_TITLE);
- PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_VERSION);
- PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT);
- PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX);
- PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_NONE);
- PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT);
- PRINT_CONSTANT ((guint)OSTREE_DIFF_FLAGS_IGNORE_XATTRS);
- PRINT_CONSTANT ((guint)OSTREE_DIFF_FLAGS_NONE);
- PRINT_CONSTANT (OSTREE_DIRMETA_GVARIANT_STRING);
- PRINT_CONSTANT (OSTREE_FILEMETA_GVARIANT_STRING);
- PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_EXPIRED_KEY);
- PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_EXPIRED_SIGNATURE);
- PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_INVALID_SIGNATURE);
- PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_MISSING_KEY);
- PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_NO_SIGNATURE);
- PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_REVOKED_KEY);
- PRINT_CONSTANT (OSTREE_GPG_KEY_GVARIANT_STRING);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_USER_NAME);
- PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_VALID);
- PRINT_CONSTANT ((guint)OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT);
- PRINT_CONSTANT (OSTREE_MAX_METADATA_SIZE);
- PRINT_CONSTANT (OSTREE_MAX_METADATA_WARN_SIZE);
- PRINT_CONSTANT (OSTREE_METADATA_KEY_BOOTABLE);
- PRINT_CONSTANT (OSTREE_METADATA_KEY_LINUX);
- PRINT_CONSTANT (OSTREE_META_KEY_DEPLOY_COLLECTION_ID);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_COMMIT);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_COMMIT_META);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_DIR_META);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_DIR_TREE);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_FILE);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_FILE_XATTRS);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_PAYLOAD_LINK);
- PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT);
- PRINT_CONSTANT (OSTREE_ORIGIN_TRANSIENT_GROUP);
- PRINT_CONSTANT (OSTREE_PATH_BOOTED);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_FILTER_ALLOW);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_FILTER_SKIP);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_MODE_NONE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_MODE_USER);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_NONE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES);
- PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL);
- PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_FILTER_ALLOW);
- PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_FILTER_SKIP);
- PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_DIR);
- PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_END);
- PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_ERROR);
- PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_FILE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_STATE_NORMAL);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_STATE_PARTIAL);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY);
- PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_ALL);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_LOOSE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_NO_PARENTS);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_PACKED);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_ALIASES);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES);
- PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_NONE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_LOCK_EXCLUSIVE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_LOCK_SHARED);
- PRINT_CONSTANT (OSTREE_REPO_METADATA_REF);
- PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_ARCHIVE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_ARCHIVE_Z2);
- PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE_SPLIT_XATTRS);
- PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE_USER);
- PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE_USER_ONLY);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_NONE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_MIRROR);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_NONE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP);
- PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_UNTRUSTED);
- PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_ADD);
- PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS);
- PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_DELETE);
- PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS);
- PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_REPLACE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY);
- PRINT_CONSTANT ((guint)OSTREE_REPO_RESOLVE_REV_EXT_NONE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_VERIFY_FLAGS_NONE);
- PRINT_CONSTANT ((guint)OSTREE_REPO_VERIFY_FLAGS_NO_GPG);
- PRINT_CONSTANT ((guint)OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI);
- PRINT_CONSTANT ((guint)OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL);
- PRINT_CONSTANT ((guint)OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING);
- PRINT_CONSTANT ((guint)OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE);
- PRINT_CONSTANT (OSTREE_SHA256_DIGEST_LEN);
- PRINT_CONSTANT (OSTREE_SHA256_STRING_LEN);
- PRINT_CONSTANT (OSTREE_SIGN_NAME_ED25519);
- PRINT_CONSTANT ((gint)OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY);
- PRINT_CONSTANT ((gint)OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR);
- PRINT_CONSTANT ((gint)OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE);
- PRINT_CONSTANT (OSTREE_SUMMARY_GVARIANT_STRING);
- PRINT_CONSTANT (OSTREE_SUMMARY_SIG_GVARIANT_STRING);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE);
- PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC);
- PRINT_CONSTANT (OSTREE_TIMESTAMP);
- PRINT_CONSTANT (OSTREE_TREE_GVARIANT_STRING);
- return 0;
+int main() {
+ PRINT_CONSTANT((guint) OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS);
+ PRINT_CONSTANT((guint) OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS);
+ PRINT_CONSTANT((guint) OSTREE_CHECKSUM_FLAGS_NONE);
+ PRINT_CONSTANT(OSTREE_COMMIT_GVARIANT_STRING);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_ARCHITECTURE);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_COLLECTION_BINDING);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_ENDOFLIFE);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_REF_BINDING);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_SOURCE_TITLE);
+ PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_VERSION);
+ PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT);
+ PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX);
+ PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_NONE);
+ PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT);
+ PRINT_CONSTANT((guint) OSTREE_DIFF_FLAGS_IGNORE_XATTRS);
+ PRINT_CONSTANT((guint) OSTREE_DIFF_FLAGS_NONE);
+ PRINT_CONSTANT(OSTREE_DIRMETA_GVARIANT_STRING);
+ PRINT_CONSTANT(OSTREE_FILEMETA_GVARIANT_STRING);
+ PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_EXPIRED_KEY);
+ PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_EXPIRED_SIGNATURE);
+ PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_INVALID_SIGNATURE);
+ PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_MISSING_KEY);
+ PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_NO_SIGNATURE);
+ PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_REVOKED_KEY);
+ PRINT_CONSTANT(OSTREE_GPG_KEY_GVARIANT_STRING);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_USER_NAME);
+ PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_VALID);
+ PRINT_CONSTANT((guint) OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT);
+ PRINT_CONSTANT(OSTREE_MAX_METADATA_SIZE);
+ PRINT_CONSTANT(OSTREE_MAX_METADATA_WARN_SIZE);
+ PRINT_CONSTANT(OSTREE_METADATA_KEY_BOOTABLE);
+ PRINT_CONSTANT(OSTREE_METADATA_KEY_LINUX);
+ PRINT_CONSTANT(OSTREE_META_KEY_DEPLOY_COLLECTION_ID);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_COMMIT);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_COMMIT_META);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_DIR_META);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_DIR_TREE);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_FILE);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_FILE_XATTRS);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_PAYLOAD_LINK);
+ PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT);
+ PRINT_CONSTANT(OSTREE_ORIGIN_TRANSIENT_GROUP);
+ PRINT_CONSTANT(OSTREE_PATH_BOOTED);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_FILTER_ALLOW);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_FILTER_SKIP);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_MODE_NONE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_MODE_USER);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_NONE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES);
+ PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL);
+ PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_FILTER_ALLOW);
+ PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_FILTER_SKIP);
+ PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_DIR);
+ PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_END);
+ PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_ERROR);
+ PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_FILE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_STATE_NORMAL);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_STATE_PARTIAL);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY);
+ PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_ALL);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_LOOSE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_NO_PARENTS);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_PACKED);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_ALIASES);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES);
+ PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_NONE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_LOCK_EXCLUSIVE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_LOCK_SHARED);
+ PRINT_CONSTANT(OSTREE_REPO_METADATA_REF);
+ PRINT_CONSTANT((gint) OSTREE_REPO_MODE_ARCHIVE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_MODE_ARCHIVE_Z2);
+ PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE_SPLIT_XATTRS);
+ PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE_USER);
+ PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE_USER_ONLY);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_NONE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_MIRROR);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_NONE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP);
+ PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_UNTRUSTED);
+ PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_ADD);
+ PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS);
+ PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_DELETE);
+ PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS);
+ PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_REPLACE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY);
+ PRINT_CONSTANT((guint) OSTREE_REPO_RESOLVE_REV_EXT_NONE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_VERIFY_FLAGS_NONE);
+ PRINT_CONSTANT((guint) OSTREE_REPO_VERIFY_FLAGS_NO_GPG);
+ PRINT_CONSTANT((guint) OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI);
+ PRINT_CONSTANT((guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL);
+ PRINT_CONSTANT((guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING);
+ PRINT_CONSTANT((guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE);
+ PRINT_CONSTANT(OSTREE_SHA256_DIGEST_LEN);
+ PRINT_CONSTANT(OSTREE_SHA256_STRING_LEN);
+ PRINT_CONSTANT(OSTREE_SIGN_NAME_ED25519);
+ PRINT_CONSTANT((gint) OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY);
+ PRINT_CONSTANT((gint) OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR);
+ PRINT_CONSTANT((gint) OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE);
+ PRINT_CONSTANT(OSTREE_SUMMARY_GVARIANT_STRING);
+ PRINT_CONSTANT(OSTREE_SUMMARY_SIG_GVARIANT_STRING);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE);
+ PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC);
+ PRINT_CONSTANT(OSTREE_TIMESTAMP);
+ PRINT_CONSTANT(OSTREE_TREE_GVARIANT_STRING);
+ return 0;
}
#include <stdalign.h>
#include <stdio.h>
-int
-main ()
-{
- printf ("%s;%zu;%zu\n", "OstreeAsyncProgressClass", sizeof (OstreeAsyncProgressClass),
- alignof (OstreeAsyncProgressClass));
- printf ("%s;%zu;%zu\n", "OstreeChecksumFlags", sizeof (OstreeChecksumFlags),
- alignof (OstreeChecksumFlags));
- printf ("%s;%zu;%zu\n", "OstreeCollectionRef", sizeof (OstreeCollectionRef),
- alignof (OstreeCollectionRef));
- printf ("%s;%zu;%zu\n", "OstreeCollectionRefv", sizeof (OstreeCollectionRefv),
- alignof (OstreeCollectionRefv));
- printf ("%s;%zu;%zu\n", "OstreeCommitSizesEntry", sizeof (OstreeCommitSizesEntry),
- alignof (OstreeCommitSizesEntry));
- printf ("%s;%zu;%zu\n", "OstreeContentWriterClass", sizeof (OstreeContentWriterClass),
- alignof (OstreeContentWriterClass));
- printf ("%s;%zu;%zu\n", "OstreeDeploymentUnlockedState", sizeof (OstreeDeploymentUnlockedState),
- alignof (OstreeDeploymentUnlockedState));
- printf ("%s;%zu;%zu\n", "OstreeDiffDirsOptions", sizeof (OstreeDiffDirsOptions),
- alignof (OstreeDiffDirsOptions));
- printf ("%s;%zu;%zu\n", "OstreeDiffFlags", sizeof (OstreeDiffFlags), alignof (OstreeDiffFlags));
- printf ("%s;%zu;%zu\n", "OstreeDiffItem", sizeof (OstreeDiffItem), alignof (OstreeDiffItem));
- printf ("%s;%zu;%zu\n", "OstreeGpgError", sizeof (OstreeGpgError), alignof (OstreeGpgError));
- printf ("%s;%zu;%zu\n", "OstreeGpgSignatureAttr", sizeof (OstreeGpgSignatureAttr),
- alignof (OstreeGpgSignatureAttr));
- printf ("%s;%zu;%zu\n", "OstreeGpgSignatureFormatFlags", sizeof (OstreeGpgSignatureFormatFlags),
- alignof (OstreeGpgSignatureFormatFlags));
- printf ("%s;%zu;%zu\n", "OstreeMutableTreeClass", sizeof (OstreeMutableTreeClass),
- alignof (OstreeMutableTreeClass));
- printf ("%s;%zu;%zu\n", "OstreeMutableTreeIter", sizeof (OstreeMutableTreeIter),
- alignof (OstreeMutableTreeIter));
- printf ("%s;%zu;%zu\n", "OstreeObjectType", sizeof (OstreeObjectType),
- alignof (OstreeObjectType));
- printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutAtOptions", sizeof (OstreeRepoCheckoutAtOptions),
- alignof (OstreeRepoCheckoutAtOptions));
- printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutFilterResult", sizeof (OstreeRepoCheckoutFilterResult),
- alignof (OstreeRepoCheckoutFilterResult));
- printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutMode", sizeof (OstreeRepoCheckoutMode),
- alignof (OstreeRepoCheckoutMode));
- printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutOverwriteMode",
- sizeof (OstreeRepoCheckoutOverwriteMode), alignof (OstreeRepoCheckoutOverwriteMode));
- printf ("%s;%zu;%zu\n", "OstreeRepoCommitFilterResult", sizeof (OstreeRepoCommitFilterResult),
- alignof (OstreeRepoCommitFilterResult));
- printf ("%s;%zu;%zu\n", "OstreeRepoCommitIterResult", sizeof (OstreeRepoCommitIterResult),
- alignof (OstreeRepoCommitIterResult));
- printf ("%s;%zu;%zu\n", "OstreeRepoCommitModifierFlags", sizeof (OstreeRepoCommitModifierFlags),
- alignof (OstreeRepoCommitModifierFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoCommitState", sizeof (OstreeRepoCommitState),
- alignof (OstreeRepoCommitState));
- printf ("%s;%zu;%zu\n", "OstreeRepoCommitTraverseFlags", sizeof (OstreeRepoCommitTraverseFlags),
- alignof (OstreeRepoCommitTraverseFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoCommitTraverseIter", sizeof (OstreeRepoCommitTraverseIter),
- alignof (OstreeRepoCommitTraverseIter));
- printf ("%s;%zu;%zu\n", "OstreeRepoFileClass", sizeof (OstreeRepoFileClass),
- alignof (OstreeRepoFileClass));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderAvahiClass", sizeof (OstreeRepoFinderAvahiClass),
- alignof (OstreeRepoFinderAvahiClass));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderConfigClass", sizeof (OstreeRepoFinderConfigClass),
- alignof (OstreeRepoFinderConfigClass));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderInterface", sizeof (OstreeRepoFinderInterface),
- alignof (OstreeRepoFinderInterface));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderMountClass", sizeof (OstreeRepoFinderMountClass),
- alignof (OstreeRepoFinderMountClass));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderOverrideClass", sizeof (OstreeRepoFinderOverrideClass),
- alignof (OstreeRepoFinderOverrideClass));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderResult", sizeof (OstreeRepoFinderResult),
- alignof (OstreeRepoFinderResult));
- printf ("%s;%zu;%zu\n", "OstreeRepoFinderResultv", sizeof (OstreeRepoFinderResultv),
- alignof (OstreeRepoFinderResultv));
- printf ("%s;%zu;%zu\n", "OstreeRepoListObjectsFlags", sizeof (OstreeRepoListObjectsFlags),
- alignof (OstreeRepoListObjectsFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoListRefsExtFlags", sizeof (OstreeRepoListRefsExtFlags),
- alignof (OstreeRepoListRefsExtFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoLockType", sizeof (OstreeRepoLockType),
- alignof (OstreeRepoLockType));
- printf ("%s;%zu;%zu\n", "OstreeRepoMode", sizeof (OstreeRepoMode), alignof (OstreeRepoMode));
- printf ("%s;%zu;%zu\n", "OstreeRepoPruneFlags", sizeof (OstreeRepoPruneFlags),
- alignof (OstreeRepoPruneFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoPruneOptions", sizeof (OstreeRepoPruneOptions),
- alignof (OstreeRepoPruneOptions));
- printf ("%s;%zu;%zu\n", "OstreeRepoPullFlags", sizeof (OstreeRepoPullFlags),
- alignof (OstreeRepoPullFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoRemoteChange", sizeof (OstreeRepoRemoteChange),
- alignof (OstreeRepoRemoteChange));
- printf ("%s;%zu;%zu\n", "OstreeRepoResolveRevExtFlags", sizeof (OstreeRepoResolveRevExtFlags),
- alignof (OstreeRepoResolveRevExtFlags));
- printf ("%s;%zu;%zu\n", "OstreeRepoTransactionStats", sizeof (OstreeRepoTransactionStats),
- alignof (OstreeRepoTransactionStats));
- printf ("%s;%zu;%zu\n", "OstreeRepoVerifyFlags", sizeof (OstreeRepoVerifyFlags),
- alignof (OstreeRepoVerifyFlags));
- printf ("%s;%zu;%zu\n", "OstreeSePolicyRestoreconFlags", sizeof (OstreeSePolicyRestoreconFlags),
- alignof (OstreeSePolicyRestoreconFlags));
- printf ("%s;%zu;%zu\n", "OstreeSignInterface", sizeof (OstreeSignInterface),
- alignof (OstreeSignInterface));
- printf ("%s;%zu;%zu\n", "OstreeStaticDeltaGenerateOpt", sizeof (OstreeStaticDeltaGenerateOpt),
- alignof (OstreeStaticDeltaGenerateOpt));
- printf ("%s;%zu;%zu\n", "OstreeStaticDeltaIndexFlags", sizeof (OstreeStaticDeltaIndexFlags),
- alignof (OstreeStaticDeltaIndexFlags));
- printf ("%s;%zu;%zu\n", "OstreeSysrootDeployTreeOpts", sizeof (OstreeSysrootDeployTreeOpts),
- alignof (OstreeSysrootDeployTreeOpts));
- printf ("%s;%zu;%zu\n", "OstreeSysrootSimpleWriteDeploymentFlags",
- sizeof (OstreeSysrootSimpleWriteDeploymentFlags),
- alignof (OstreeSysrootSimpleWriteDeploymentFlags));
- printf ("%s;%zu;%zu\n", "OstreeSysrootUpgraderFlags", sizeof (OstreeSysrootUpgraderFlags),
- alignof (OstreeSysrootUpgraderFlags));
- printf ("%s;%zu;%zu\n", "OstreeSysrootUpgraderPullFlags", sizeof (OstreeSysrootUpgraderPullFlags),
- alignof (OstreeSysrootUpgraderPullFlags));
- printf ("%s;%zu;%zu\n", "OstreeSysrootWriteDeploymentsOpts",
- sizeof (OstreeSysrootWriteDeploymentsOpts), alignof (OstreeSysrootWriteDeploymentsOpts));
- return 0;
+int main() {
+ printf("%s;%zu;%zu\n", "OstreeAsyncProgressClass", sizeof(OstreeAsyncProgressClass), alignof(OstreeAsyncProgressClass));
+ printf("%s;%zu;%zu\n", "OstreeChecksumFlags", sizeof(OstreeChecksumFlags), alignof(OstreeChecksumFlags));
+ printf("%s;%zu;%zu\n", "OstreeCollectionRef", sizeof(OstreeCollectionRef), alignof(OstreeCollectionRef));
+ printf("%s;%zu;%zu\n", "OstreeCollectionRefv", sizeof(OstreeCollectionRefv), alignof(OstreeCollectionRefv));
+ printf("%s;%zu;%zu\n", "OstreeCommitSizesEntry", sizeof(OstreeCommitSizesEntry), alignof(OstreeCommitSizesEntry));
+ printf("%s;%zu;%zu\n", "OstreeContentWriterClass", sizeof(OstreeContentWriterClass), alignof(OstreeContentWriterClass));
+ printf("%s;%zu;%zu\n", "OstreeDeploymentUnlockedState", sizeof(OstreeDeploymentUnlockedState), alignof(OstreeDeploymentUnlockedState));
+ printf("%s;%zu;%zu\n", "OstreeDiffDirsOptions", sizeof(OstreeDiffDirsOptions), alignof(OstreeDiffDirsOptions));
+ printf("%s;%zu;%zu\n", "OstreeDiffFlags", sizeof(OstreeDiffFlags), alignof(OstreeDiffFlags));
+ printf("%s;%zu;%zu\n", "OstreeDiffItem", sizeof(OstreeDiffItem), alignof(OstreeDiffItem));
+ printf("%s;%zu;%zu\n", "OstreeGpgError", sizeof(OstreeGpgError), alignof(OstreeGpgError));
+ printf("%s;%zu;%zu\n", "OstreeGpgSignatureAttr", sizeof(OstreeGpgSignatureAttr), alignof(OstreeGpgSignatureAttr));
+ printf("%s;%zu;%zu\n", "OstreeGpgSignatureFormatFlags", sizeof(OstreeGpgSignatureFormatFlags), alignof(OstreeGpgSignatureFormatFlags));
+ printf("%s;%zu;%zu\n", "OstreeMutableTreeClass", sizeof(OstreeMutableTreeClass), alignof(OstreeMutableTreeClass));
+ printf("%s;%zu;%zu\n", "OstreeMutableTreeIter", sizeof(OstreeMutableTreeIter), alignof(OstreeMutableTreeIter));
+ printf("%s;%zu;%zu\n", "OstreeObjectType", sizeof(OstreeObjectType), alignof(OstreeObjectType));
+ printf("%s;%zu;%zu\n", "OstreeRepoCheckoutAtOptions", sizeof(OstreeRepoCheckoutAtOptions), alignof(OstreeRepoCheckoutAtOptions));
+ printf("%s;%zu;%zu\n", "OstreeRepoCheckoutFilterResult", sizeof(OstreeRepoCheckoutFilterResult), alignof(OstreeRepoCheckoutFilterResult));
+ printf("%s;%zu;%zu\n", "OstreeRepoCheckoutMode", sizeof(OstreeRepoCheckoutMode), alignof(OstreeRepoCheckoutMode));
+ printf("%s;%zu;%zu\n", "OstreeRepoCheckoutOverwriteMode", sizeof(OstreeRepoCheckoutOverwriteMode), alignof(OstreeRepoCheckoutOverwriteMode));
+ printf("%s;%zu;%zu\n", "OstreeRepoCommitFilterResult", sizeof(OstreeRepoCommitFilterResult), alignof(OstreeRepoCommitFilterResult));
+ printf("%s;%zu;%zu\n", "OstreeRepoCommitIterResult", sizeof(OstreeRepoCommitIterResult), alignof(OstreeRepoCommitIterResult));
+ printf("%s;%zu;%zu\n", "OstreeRepoCommitModifierFlags", sizeof(OstreeRepoCommitModifierFlags), alignof(OstreeRepoCommitModifierFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoCommitState", sizeof(OstreeRepoCommitState), alignof(OstreeRepoCommitState));
+ printf("%s;%zu;%zu\n", "OstreeRepoCommitTraverseFlags", sizeof(OstreeRepoCommitTraverseFlags), alignof(OstreeRepoCommitTraverseFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoCommitTraverseIter", sizeof(OstreeRepoCommitTraverseIter), alignof(OstreeRepoCommitTraverseIter));
+ printf("%s;%zu;%zu\n", "OstreeRepoFileClass", sizeof(OstreeRepoFileClass), alignof(OstreeRepoFileClass));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderAvahiClass", sizeof(OstreeRepoFinderAvahiClass), alignof(OstreeRepoFinderAvahiClass));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderConfigClass", sizeof(OstreeRepoFinderConfigClass), alignof(OstreeRepoFinderConfigClass));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderInterface", sizeof(OstreeRepoFinderInterface), alignof(OstreeRepoFinderInterface));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderMountClass", sizeof(OstreeRepoFinderMountClass), alignof(OstreeRepoFinderMountClass));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderOverrideClass", sizeof(OstreeRepoFinderOverrideClass), alignof(OstreeRepoFinderOverrideClass));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderResult", sizeof(OstreeRepoFinderResult), alignof(OstreeRepoFinderResult));
+ printf("%s;%zu;%zu\n", "OstreeRepoFinderResultv", sizeof(OstreeRepoFinderResultv), alignof(OstreeRepoFinderResultv));
+ printf("%s;%zu;%zu\n", "OstreeRepoListObjectsFlags", sizeof(OstreeRepoListObjectsFlags), alignof(OstreeRepoListObjectsFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoListRefsExtFlags", sizeof(OstreeRepoListRefsExtFlags), alignof(OstreeRepoListRefsExtFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoLockType", sizeof(OstreeRepoLockType), alignof(OstreeRepoLockType));
+ printf("%s;%zu;%zu\n", "OstreeRepoMode", sizeof(OstreeRepoMode), alignof(OstreeRepoMode));
+ printf("%s;%zu;%zu\n", "OstreeRepoPruneFlags", sizeof(OstreeRepoPruneFlags), alignof(OstreeRepoPruneFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoPruneOptions", sizeof(OstreeRepoPruneOptions), alignof(OstreeRepoPruneOptions));
+ printf("%s;%zu;%zu\n", "OstreeRepoPullFlags", sizeof(OstreeRepoPullFlags), alignof(OstreeRepoPullFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoRemoteChange", sizeof(OstreeRepoRemoteChange), alignof(OstreeRepoRemoteChange));
+ printf("%s;%zu;%zu\n", "OstreeRepoResolveRevExtFlags", sizeof(OstreeRepoResolveRevExtFlags), alignof(OstreeRepoResolveRevExtFlags));
+ printf("%s;%zu;%zu\n", "OstreeRepoTransactionStats", sizeof(OstreeRepoTransactionStats), alignof(OstreeRepoTransactionStats));
+ printf("%s;%zu;%zu\n", "OstreeRepoVerifyFlags", sizeof(OstreeRepoVerifyFlags), alignof(OstreeRepoVerifyFlags));
+ printf("%s;%zu;%zu\n", "OstreeSePolicyRestoreconFlags", sizeof(OstreeSePolicyRestoreconFlags), alignof(OstreeSePolicyRestoreconFlags));
+ printf("%s;%zu;%zu\n", "OstreeSignInterface", sizeof(OstreeSignInterface), alignof(OstreeSignInterface));
+ printf("%s;%zu;%zu\n", "OstreeStaticDeltaGenerateOpt", sizeof(OstreeStaticDeltaGenerateOpt), alignof(OstreeStaticDeltaGenerateOpt));
+ printf("%s;%zu;%zu\n", "OstreeStaticDeltaIndexFlags", sizeof(OstreeStaticDeltaIndexFlags), alignof(OstreeStaticDeltaIndexFlags));
+ printf("%s;%zu;%zu\n", "OstreeSysrootDeployTreeOpts", sizeof(OstreeSysrootDeployTreeOpts), alignof(OstreeSysrootDeployTreeOpts));
+ printf("%s;%zu;%zu\n", "OstreeSysrootSimpleWriteDeploymentFlags", sizeof(OstreeSysrootSimpleWriteDeploymentFlags), alignof(OstreeSysrootSimpleWriteDeploymentFlags));
+ printf("%s;%zu;%zu\n", "OstreeSysrootUpgraderFlags", sizeof(OstreeSysrootUpgraderFlags), alignof(OstreeSysrootUpgraderFlags));
+ printf("%s;%zu;%zu\n", "OstreeSysrootUpgraderPullFlags", sizeof(OstreeSysrootUpgraderPullFlags), alignof(OstreeSysrootUpgraderPullFlags));
+ printf("%s;%zu;%zu\n", "OstreeSysrootWriteDeploymentsOpts", sizeof(OstreeSysrootWriteDeploymentsOpts), alignof(OstreeSysrootWriteDeploymentsOpts));
+ return 0;
}